Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Li Wenzhe
wine
Commits
a7617a05
Commit
a7617a05
authored
25 years ago
by
Ulrich Weigand
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: DISPLAY_SetCursor should not use USER-internals, as it is also
used with native USER ...
parent
23f4b09c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/x11drv/mouse.c
+24
-25
24 additions, 25 deletions
windows/x11drv/mouse.c
with
24 additions
and
25 deletions
windows/x11drv/mouse.c
+
24
−
25
View file @
a7617a05
...
...
@@ -33,7 +33,6 @@ static BOOL X11DRV_MOUSE_DoSetCursor( CURSORICONINFO *ptr )
Pixmap
pixmapBits
,
pixmapMask
,
pixmapAll
;
XColor
fg
,
bg
;
Cursor
cursor
=
None
;
BOOL
DesktopWinExists
=
FALSE
;
if
(
!
ptr
)
/* Create an empty cursor */
{
...
...
@@ -144,45 +143,45 @@ static BOOL X11DRV_MOUSE_DoSetCursor( CURSORICONINFO *ptr )
if
(
X11DRV_MOUSE_XCursor
!=
None
)
XFreeCursor
(
display
,
X11DRV_MOUSE_XCursor
);
X11DRV_MOUSE_XCursor
=
cursor
;
if
(
WIN_GetDesktop
()
!=
NULL
)
{
DesktopWinExists
=
TRUE
;
WIN_ReleaseDesktop
();
}
if
(
X11DRV_GetXRootWindow
()
!=
DefaultRootWindow
(
display
)
||
!
DesktopWinExists
)
return
TRUE
;
}
/***********************************************************************
* X11DRV_MOUSE_SetCursor
*/
void
X11DRV_MOUSE_SetCursor
(
CURSORICONINFO
*
lpCursor
)
{
BOOL
success
;
EnterCriticalSection
(
&
X11DRV_CritSection
);
success
=
CALL_LARGE_STACK
(
X11DRV_MOUSE_DoSetCursor
,
lpCursor
);
LeaveCriticalSection
(
&
X11DRV_CritSection
);
if
(
!
success
)
return
;
if
(
X11DRV_GetXRootWindow
()
!=
DefaultRootWindow
(
display
))
{
/* Set the cursor on the desktop window */
XDefineCursor
(
display
,
X11DRV_GetXRootWindow
(),
cursor
);
/* If in desktop mode, set the cursor on the desktop window */
XDefineCursor
(
display
,
X11DRV_GetXRootWindow
(),
X11DRV_MOUSE_XCursor
);
}
else
{
/* FIXME: this won't work correctly with native USER !*/
/* Else, set the same cursor for all top-level windows */
/* FIXME: we should not reference USER internals here, but native USER
works only in desktop mode anyway, so this should not matter */
/* Set the same cursor for all top-level windows */
HWND
hwnd
=
GetWindow
(
GetDesktopWindow
(),
GW_CHILD
);
while
(
hwnd
)
{
WND
*
tmpWnd
=
WIN_FindWndPtr
(
hwnd
);
Window
win
=
X11DRV_WND_FindXWindow
(
tmpWnd
);
if
(
win
&&
win
!=
DefaultRootWindow
(
display
))
XDefineCursor
(
display
,
win
,
c
ursor
);
XDefineCursor
(
display
,
win
,
X11DRV_MOUSE_XC
ursor
);
hwnd
=
GetWindow
(
hwnd
,
GW_HWNDNEXT
);
WIN_ReleaseWndPtr
(
tmpWnd
);
}
}
return
TRUE
;
}
/***********************************************************************
* X11DRV_MOUSE_SetCursor
*/
void
X11DRV_MOUSE_SetCursor
(
CURSORICONINFO
*
lpCursor
)
{
WIN_LockWnds
();
EnterCriticalSection
(
&
X11DRV_CritSection
);
CALL_LARGE_STACK
(
X11DRV_MOUSE_DoSetCursor
,
lpCursor
);
LeaveCriticalSection
(
&
X11DRV_CritSection
);
WIN_UnlockWnds
();
}
/***********************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment