Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9d237f97
Commit
9d237f97
authored
Dec 01, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add a helper function to check a motion event against the serial number.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
93ff3fde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
mouse.c
dlls/winex11.drv/mouse.c
+21
-19
No files found.
dlls/winex11.drv/mouse.c
View file @
9d237f97
...
...
@@ -520,6 +520,21 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
return
grab_clipping_window
(
&
rect
);
}
/***********************************************************************
* is_old_motion_event
*/
static
BOOL
is_old_motion_event
(
unsigned
long
serial
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
if
(
!
thread_data
->
warp_serial
)
return
FALSE
;
if
((
long
)(
serial
-
thread_data
->
warp_serial
)
<
0
)
return
TRUE
;
thread_data
->
warp_serial
=
0
;
/* we caught up now */
return
FALSE
;
}
/***********************************************************************
* send_mouse_input
*
...
...
@@ -1576,20 +1591,11 @@ void X11DRV_MotionNotify( HWND hwnd, XEvent *xev )
input
.
u
.
mi
.
time
=
EVENT_x11_time_to_win32_time
(
event
->
time
);
input
.
u
.
mi
.
dwExtraInfo
=
0
;
if
(
!
hwnd
)
if
(
!
hwnd
&&
is_old_motion_event
(
event
->
serial
)
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
if
(
thread_data
->
warp_serial
)
{
if
((
long
)(
event
->
serial
-
thread_data
->
warp_serial
)
<
0
)
{
TRACE
(
"pos %d,%d old serial %lu, ignoring
\n
"
,
input
.
u
.
mi
.
dx
,
input
.
u
.
mi
.
dy
,
event
->
serial
);
return
;
}
thread_data
->
warp_serial
=
0
;
/* we caught up now */
}
TRACE
(
"pos %d,%d old serial %lu, ignoring
\n
"
,
input
.
u
.
mi
.
dx
,
input
.
u
.
mi
.
dy
,
event
->
serial
);
return
;
}
send_mouse_input
(
hwnd
,
event
->
window
,
event
->
state
,
&
input
);
}
...
...
@@ -1677,14 +1683,10 @@ static void X11DRV_RawMotion( XGenericEventCookie *xev )
break
;
}
if
(
broken_rawevents
&&
thread_data
->
warp_serial
)
if
(
broken_rawevents
&&
is_old_motion_event
(
xev
->
serial
)
)
{
if
((
long
)(
xev
->
serial
-
thread_data
->
warp_serial
)
<
0
)
{
TRACE
(
"pos %d,%d old serial %lu, ignoring
\n
"
,
input
.
u
.
mi
.
dx
,
input
.
u
.
mi
.
dy
,
xev
->
serial
);
return
;
}
thread_data
->
warp_serial
=
0
;
/* we caught up now */
TRACE
(
"pos %d,%d old serial %lu, ignoring
\n
"
,
input
.
u
.
mi
.
dx
,
input
.
u
.
mi
.
dy
,
xev
->
serial
);
return
;
}
TRACE
(
"pos %d,%d (event %f,%f)
\n
"
,
input
.
u
.
mi
.
dx
,
input
.
u
.
mi
.
dy
,
dx
,
dy
);
...
...
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