Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
098b11e9
Commit
098b11e9
authored
Nov 09, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Don't allow setting the cursor across processes while clipping.
parent
5bb094c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
mouse.c
dlls/winex11.drv/mouse.c
+10
-3
window.c
dlls/winex11.drv/window.c
+2
-0
No files found.
dlls/winex11.drv/mouse.c
View file @
098b11e9
...
...
@@ -420,6 +420,7 @@ static BOOL grab_clipping_window( const RECT *clip, BOOL only_with_xinput )
}
clip_rect
=
*
clip
;
if
(
!
data
->
clip_hwnd
)
sync_window_cursor
(
clip_window
);
InterlockedExchangePointer
(
(
void
**
)
&
cursor_window
,
msg_hwnd
);
data
->
clip_hwnd
=
msg_hwnd
;
SendMessageW
(
GetDesktopWindow
(),
WM_X11DRV_CLIP_CURSOR
,
0
,
(
LPARAM
)
msg_hwnd
);
return
TRUE
;
...
...
@@ -542,9 +543,16 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
if
(
!
hwnd
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
HWND
clip_hwnd
=
thread_data
->
clip_hwnd
;
if
(
!
thread_data
->
clip_hwnd
)
return
;
if
(
!
clip_hwnd
)
return
;
if
(
thread_data
->
clip_window
!=
window
)
return
;
if
(
InterlockedExchangePointer
(
(
void
**
)
&
cursor_window
,
clip_hwnd
)
!=
clip_hwnd
||
GetTickCount
()
-
last_cursor_change
>
100
)
{
sync_window_cursor
(
window
);
last_cursor_change
=
GetTickCount
();
}
input
->
u
.
mi
.
dx
+=
clip_rect
.
left
;
input
->
u
.
mi
.
dy
+=
clip_rect
.
top
;
__wine_send_input
(
hwnd
,
input
);
...
...
@@ -1215,8 +1223,7 @@ void CDECL X11DRV_SetCursor( HCURSOR handle )
GetTickCount
()
-
last_cursor_change
>
100
)
{
last_cursor_change
=
GetTickCount
();
if
(
clipping_cursor
)
set_window_cursor
(
init_clip_window
(),
handle
);
else
if
(
cursor_window
)
SendNotifyMessageW
(
cursor_window
,
WM_X11DRV_SET_CURSOR
,
0
,
(
LPARAM
)
handle
);
if
(
cursor_window
)
SendNotifyMessageW
(
cursor_window
,
WM_X11DRV_SET_CURSOR
,
0
,
(
LPARAM
)
handle
);
}
}
...
...
dlls/winex11.drv/window.c
View file @
098b11e9
...
...
@@ -2699,6 +2699,8 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
case
WM_X11DRV_SET_CURSOR
:
if
((
data
=
X11DRV_get_win_data
(
hwnd
))
&&
data
->
whole_window
)
set_window_cursor
(
data
->
whole_window
,
(
HCURSOR
)
lp
);
else
if
(
hwnd
==
x11drv_thread_data
()
->
clip_hwnd
)
set_window_cursor
(
x11drv_thread_data
()
->
clip_window
,
(
HCURSOR
)
lp
);
return
0
;
case
WM_X11DRV_CLIP_CURSOR
:
return
clip_cursor_notify
(
hwnd
,
(
HWND
)
lp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment