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
adb86c5f
Commit
adb86c5f
authored
Jun 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Try harder to ignore broken raw motions events caused by pointer warping.
parent
d2910bb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
mouse.c
dlls/winex11.drv/mouse.c
+4
-5
No files found.
dlls/winex11.drv/mouse.c
View file @
adb86c5f
...
...
@@ -1220,9 +1220,10 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y )
struct
x11drv_thread_data
*
data
=
x11drv_init_thread_data
();
wine_tsx11_lock
();
data
->
warp_serial
=
NextRequest
(
data
->
display
);
XWarpPointer
(
data
->
display
,
root_window
,
root_window
,
0
,
0
,
0
,
0
,
x
-
virtual_screen_rect
.
left
,
y
-
virtual_screen_rect
.
top
);
data
->
warp_serial
=
NextRequest
(
data
->
display
);
XNoOp
(
data
->
display
);
XFlush
(
data
->
display
);
/* avoids bad mouse lag in games that do their own mouse warping */
wine_tsx11_unlock
();
TRACE
(
"warped to %d,%d serial %lu
\n
"
,
x
,
y
,
data
->
warp_serial
);
...
...
@@ -1431,14 +1432,12 @@ static void X11DRV_RawMotion( XGenericEventCookie *xev )
if
(
thread_data
->
warp_serial
)
{
long
diff
=
xev
->
serial
-
thread_data
->
warp_serial
;
if
(
diff
>=
0
)
thread_data
->
warp_serial
=
0
;
/* we caught up now */
if
(
diff
<=
0
)
/* <= 0 because we also want to ignore the first event after the warp request */
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
\n
"
,
input
.
u
.
mi
.
dx
,
input
.
u
.
mi
.
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