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
ecf9e913
Commit
ecf9e913
authored
Mar 10, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Use grabbed window display in SetCapture.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aeefbdff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
15 deletions
+19
-15
mouse.c
dlls/winex11.drv/mouse.c
+2
-2
window.c
dlls/winex11.drv/window.c
+16
-12
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
No files found.
dlls/winex11.drv/mouse.c
View file @
ecf9e913
...
...
@@ -602,7 +602,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
/* update the wine server Z-order */
if
(
window
!=
x11drv_thread_data
()
->
grab_window
&&
if
(
hwnd
!=
x11drv_thread_data
()
->
grab_hwnd
&&
/* ignore event if a button is pressed, since the mouse is then grabbed too */
!
(
state
&
(
Button1Mask
|
Button2Mask
|
Button3Mask
|
Button4Mask
|
Button5Mask
|
Button6Mask
|
Button7Mask
)))
{
...
...
@@ -1611,7 +1611,7 @@ void X11DRV_EnterNotify( HWND hwnd, XEvent *xev )
TRACE
(
"hwnd %p/%lx pos %d,%d detail %d
\n
"
,
hwnd
,
event
->
window
,
event
->
x
,
event
->
y
,
event
->
detail
);
if
(
event
->
detail
==
NotifyVirtual
)
return
;
if
(
event
->
window
==
x11drv_thread_data
()
->
grab_window
)
return
;
if
(
hwnd
==
x11drv_thread_data
()
->
grab_hwnd
)
return
;
/* simulate a mouse motion event */
input
.
u
.
mi
.
dx
=
event
->
x
;
...
...
dlls/winex11.drv/window.c
View file @
ecf9e913
...
...
@@ -2116,27 +2116,31 @@ BOOL CDECL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update )
void
CDECL
X11DRV_SetCapture
(
HWND
hwnd
,
UINT
flags
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
struct
x11drv_win_data
*
data
;
if
(
!
thread_data
)
return
;
if
(
!
(
flags
&
(
GUI_INMOVESIZE
|
GUI_INMENUMODE
)))
return
;
if
(
hwnd
)
{
Window
grab_win
=
X11DRV_get_whole_window
(
GetAncestor
(
hwnd
,
GA_ROOT
)
);
if
(
!
grab_win
)
return
;
XFlush
(
gdi_display
);
XGrabPointer
(
thread_data
->
display
,
grab_win
,
False
,
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
,
GrabModeAsync
,
GrabModeAsync
,
None
,
None
,
CurrentTime
);
thread_data
->
grab_window
=
grab_win
;
if
(
!
(
data
=
get_win_data
(
GetAncestor
(
hwnd
,
GA_ROOT
))))
return
;
if
(
data
->
whole_window
)
{
XFlush
(
gdi_display
);
XGrabPointer
(
data
->
display
,
data
->
whole_window
,
False
,
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
,
GrabModeAsync
,
GrabModeAsync
,
None
,
None
,
CurrentTime
);
thread_data
->
grab_hwnd
=
data
->
hwnd
;
}
release_win_data
(
data
);
}
else
/* release capture */
{
if
(
!
(
data
=
get_win_data
(
thread_data
->
grab_hwnd
)))
return
;
XFlush
(
gdi_display
);
XUngrabPointer
(
thread_data
->
display
,
CurrentTime
);
XFlush
(
thread_data
->
display
);
thread_data
->
grab_window
=
None
;
XUngrabPointer
(
data
->
display
,
CurrentTime
);
XFlush
(
data
->
display
);
thread_data
->
grab_hwnd
=
NULL
;
release_win_data
(
data
);
}
}
...
...
dlls/winex11.drv/x11drv.h
View file @
ecf9e913
...
...
@@ -308,7 +308,7 @@ struct x11drv_thread_data
{
Display
*
display
;
XEvent
*
current_event
;
/* event currently being processed */
Window
grab_window
;
/* window that currently grabs the mouse */
HWND
grab_hwnd
;
/* window that currently grabs the mouse */
HWND
last_focus
;
/* last window that had focus */
XIM
xim
;
/* input method */
HWND
last_xic_hwnd
;
/* last xic window */
...
...
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