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
da9922b4
Commit
da9922b4
authored
Apr 27, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Ignore MotionNotify events if we have pending RawMotion events.
parent
10901e17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
event.c
dlls/winex11.drv/event.c
+25
-1
mouse.c
dlls/winex11.drv/mouse.c
+0
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
No files found.
dlls/winex11.drv/event.c
View file @
da9922b4
...
...
@@ -32,6 +32,9 @@
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#include <X11/Xutil.h>
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
#include <X11/extensions/XInput2.h>
#endif
#include <assert.h>
#include <stdarg.h>
...
...
@@ -154,6 +157,8 @@ static const char * event_names[MAX_EVENT_HANDLERS] =
"SelectionNotify"
,
"ColormapNotify"
,
"ClientMessage"
,
"MappingNotify"
,
"GenericEvent"
};
int
xinput2_opcode
=
0
;
/* return the name of an X event */
static
const
char
*
dbgstr_event
(
int
type
)
{
...
...
@@ -236,7 +241,8 @@ enum event_merge_action
{
MERGE_DISCARD
,
/* discard the old event */
MERGE_HANDLE
,
/* handle the old event */
MERGE_KEEP
/* keep the old event for future merging */
MERGE_KEEP
,
/* keep the old event for future merging */
MERGE_IGNORE
/* ignore the new event, keep the old one */
};
/***********************************************************************
...
...
@@ -270,6 +276,22 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next )
return
MERGE_DISCARD
;
}
break
;
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
case
GenericEvent
:
if
(
prev
->
xcookie
.
extension
!=
xinput2_opcode
)
break
;
if
(
prev
->
xcookie
.
evtype
!=
XI_RawMotion
)
break
;
switch
(
next
->
type
)
{
case
MotionNotify
:
if
(
next
->
xany
.
window
==
x11drv_thread_data
()
->
clip_window
)
{
TRACE
(
"ignoring MotionNotify for clip window
\n
"
);
return
MERGE_IGNORE
;
}
break
;
}
break
;
#endif
}
return
MERGE_HANDLE
;
}
...
...
@@ -363,6 +385,8 @@ static int process_events( Display *display, Bool (*filter)(Display*, XEvent*,XP
break
;
case
MERGE_KEEP
:
/* handle new, keep prev for future merging */
call_event_handler
(
display
,
&
event
);
/* fall through */
case
MERGE_IGNORE
:
/* ignore new, keep prev for future merging */
free_event_data
(
&
event
);
break
;
}
...
...
dlls/winex11.drv/mouse.c
View file @
da9922b4
...
...
@@ -130,7 +130,6 @@ static Cursor create_cursor( HANDLE handle );
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
static
BOOL
xinput2_available
;
static
int
xinput2_opcode
;
static
int
xinput2_core_pointer
;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR
(
XIFreeDeviceInfo
);
...
...
dlls/winex11.drv/x11drv.h
View file @
da9922b4
...
...
@@ -733,6 +733,7 @@ extern void X11DRV_SelectionClear( HWND hWnd, XEvent *event );
extern
void
X11DRV_MappingNotify
(
HWND
hWnd
,
XEvent
*
event
);
extern
void
X11DRV_GenericEvent
(
HWND
hwnd
,
XEvent
*
event
);
extern
int
xinput2_opcode
;
extern
Bool
(
*
pXGetEventData
)(
Display
*
display
,
XEvent
/*XGenericEventCookie*/
*
event
);
extern
void
(
*
pXFreeEventData
)(
Display
*
display
,
XEvent
/*XGenericEventCookie*/
*
event
);
...
...
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