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
852687f1
Commit
852687f1
authored
Feb 01, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Poll the mouse button to detect the end of a window manager move/resize.
parent
abfed909
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
1 deletion
+45
-1
mouse.c
dlls/winex11.drv/mouse.c
+45
-1
No files found.
dlls/winex11.drv/mouse.c
View file @
852687f1
...
...
@@ -1332,8 +1332,10 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
void
move_resize_window
(
Display
*
display
,
struct
x11drv_win_data
*
data
,
int
dir
)
{
DWORD
pt
;
int
x
,
y
,
button
=
0
;
int
x
,
y
,
rootX
,
rootY
,
ret
,
button
=
0
;
XEvent
xev
;
Window
root
,
child
;
unsigned
int
xstate
;
pt
=
GetMessagePos
();
x
=
(
short
)
LOWORD
(
pt
);
...
...
@@ -1365,6 +1367,48 @@ void move_resize_window( Display *display, struct x11drv_win_data *data, int dir
XUngrabPointer
(
display
,
CurrentTime
);
XSendEvent
(
display
,
root_window
,
False
,
SubstructureNotifyMask
|
SubstructureRedirectMask
,
&
xev
);
wine_tsx11_unlock
();
/* try to detect the end of the size/move by polling for the mouse button to be released */
/* (some apps don't like it if we return before the size/move is done) */
if
(
!
button
)
return
;
for
(;;)
{
MSG
msg
;
INPUT
input
;
wine_tsx11_lock
();
ret
=
XQueryPointer
(
display
,
root_window
,
&
root
,
&
child
,
&
rootX
,
&
rootY
,
&
x
,
&
y
,
&
xstate
);
wine_tsx11_unlock
();
if
(
!
ret
)
break
;
if
(
!
(
xstate
&
(
Button1Mask
<<
(
button
-
1
))))
{
/* fake a button release event */
input
.
type
=
INPUT_MOUSE
;
input
.
u
.
mi
.
dx
=
x
+
virtual_screen_rect
.
left
;
input
.
u
.
mi
.
dy
=
y
+
virtual_screen_rect
.
top
;
input
.
u
.
mi
.
mouseData
=
button_up_data
[
button
-
1
];
input
.
u
.
mi
.
dwFlags
=
button_up_flags
[
button
-
1
]
|
MOUSEEVENTF_ABSOLUTE
|
MOUSEEVENTF_MOVE
;
input
.
u
.
mi
.
time
=
GetTickCount
();
input
.
u
.
mi
.
dwExtraInfo
=
0
;
__wine_send_input
(
data
->
hwnd
,
&
input
);
}
while
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
!
CallMsgFilterW
(
&
msg
,
MSGF_SIZE
))
{
TranslateMessage
(
&
msg
);
DispatchMessageW
(
&
msg
);
}
}
if
(
!
(
xstate
&
(
Button1Mask
<<
(
button
-
1
))))
break
;
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
100
,
QS_ALLINPUT
);
}
TRACE
(
"hwnd %p/%lx done
\n
"
,
data
->
hwnd
,
data
->
whole_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