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
7714efe2
Commit
7714efe2
authored
Jan 26, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Feb 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Only enable XInput2 cursor warp workaround if necessary.
Based on a patch by Patrick Rudolph.
parent
44fbc018
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
mouse.c
dlls/winex11.drv/mouse.c
+17
-2
No files found.
dlls/winex11.drv/mouse.c
View file @
7714efe2
...
...
@@ -131,6 +131,7 @@ static Cursor create_cursor( HANDLE handle );
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
static
BOOL
xinput2_available
;
static
BOOL
broken_rawevents
;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR
(
XIFreeDeviceInfo
);
MAKE_FUNCPTR
(
XIQueryDevice
);
...
...
@@ -1579,7 +1580,15 @@ void X11DRV_MotionNotify( HWND hwnd, XEvent *xev )
if
(
!
hwnd
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
if
(
thread_data
->
warp_serial
&&
(
long
)(
event
->
serial
-
thread_data
->
warp_serial
)
<
0
)
return
;
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 */
}
}
send_mouse_input
(
hwnd
,
event
->
window
,
event
->
state
,
&
input
);
...
...
@@ -1669,7 +1678,7 @@ static void X11DRV_RawMotion( XGenericEventCookie *xev )
break
;
}
if
(
thread_data
->
warp_serial
)
if
(
broken_rawevents
&&
thread_data
->
warp_serial
)
{
if
((
long
)(
xev
->
serial
-
thread_data
->
warp_serial
)
<
0
)
{
...
...
@@ -1716,6 +1725,12 @@ void X11DRV_XInput2_Init(void)
#undef LOAD_FUNCPTR
xinput2_available
=
XQueryExtension
(
gdi_display
,
"XInputExtension"
,
&
xinput2_opcode
,
&
event
,
&
error
);
/* Until version 1.10.4 rawinput was broken in XOrg, see
* https://bugs.freedesktop.org/show_bug.cgi?id=30068 */
broken_rawevents
=
strstr
(
XServerVendor
(
gdi_display
),
"X.Org"
)
&&
XVendorRelease
(
gdi_display
)
<
11004000
;
#else
TRACE
(
"X Input 2 support not compiled in.
\n
"
);
#endif
...
...
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