Alexandre Julliard : winex11: Still process all MotionNotify events when using XInput2.
Alexandre Julliard
julliard at winehq.org
Wed Nov 9 13:29:42 CST 2011
Module: wine
Branch: master
Commit: 9716d1c8619e5fe68d1ad3ab9a18b106499b3fac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9716d1c8619e5fe68d1ad3ab9a18b106499b3fac
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Nov 9 15:45:13 2011 +0100
winex11: Still process all MotionNotify events when using XInput2.
---
dlls/winex11.drv/event.c | 47 ++++++++++++++++++++++-----------------------
dlls/winex11.drv/mouse.c | 2 -
dlls/winex11.drv/x11drv.h | 1 -
3 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 00915cf..1b3478d 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -310,37 +310,36 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next )
}
break;
case MotionNotify:
- if (prev->xany.window == next->xany.window && next->type == MotionNotify)
+ switch (next->type)
{
- TRACE( "discarding duplicate MotionNotify for window %lx\n", prev->xany.window );
- return MERGE_DISCARD;
+ case MotionNotify:
+ if (prev->xany.window == next->xany.window)
+ {
+ TRACE( "discarding duplicate MotionNotify for window %lx\n", prev->xany.window );
+ return MERGE_DISCARD;
+ }
+ break;
+#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
+ case GenericEvent:
+ if (next->xcookie.extension != xinput2_opcode) break;
+ if (next->xcookie.evtype != XI_RawMotion) break;
+ if (x11drv_thread_data()->warp_serial) break;
+ return MERGE_KEEP;
}
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)
{
- struct x11drv_thread_data *thread_data = x11drv_thread_data();
- if (prev->xcookie.extension != xinput2_opcode) break;
- if (prev->xcookie.evtype != XI_RawMotion) break;
- if (thread_data->warp_serial) break;
- switch (next->type)
- {
- case MotionNotify:
- if (next->xany.window == thread_data->clip_window &&
- next->xmotion.time - thread_data->last_motion_notify < 1000)
- {
- TRACE( "ignoring MotionNotify for clip window\n" );
- return MERGE_IGNORE;
- }
- break;
- case GenericEvent:
- if (next->xcookie.extension != xinput2_opcode) break;
- if (next->xcookie.evtype != XI_RawMotion) break;
- return merge_raw_motion_events( prev->xcookie.data, next->xcookie.data );
- }
+ case GenericEvent:
+ if (next->xcookie.extension != xinput2_opcode) break;
+ if (next->xcookie.evtype != XI_RawMotion) break;
+ if (x11drv_thread_data()->warp_serial) break;
+ return merge_raw_motion_events( prev->xcookie.data, next->xcookie.data );
+#endif
}
break;
-#endif
}
return MERGE_HANDLE;
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 112b4cf..d4249f4 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -1387,9 +1387,7 @@ void X11DRV_MotionNotify( HWND hwnd, XEvent *xev )
if (!hwnd)
{
struct x11drv_thread_data *thread_data = x11drv_thread_data();
- if (event->time - thread_data->last_motion_notify < 1000) return;
if (thread_data->warp_serial && (long)(event->serial - thread_data->warp_serial) < 0) return;
- thread_data->last_motion_notify = event->time;
}
send_mouse_input( hwnd, event->window, event->state, &input );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 4967866..dbc0629 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -548,7 +548,6 @@ struct x11drv_thread_data
HWND last_focus; /* last window that had focus */
XIM xim; /* input method */
HWND last_xic_hwnd; /* last xic window */
- Time last_motion_notify; /* time of last mouse motion */
XFontSet font_set; /* international text drawing font set */
Window selection_wnd; /* window used for selection interactions */
unsigned long warp_serial; /* serial number of last pointer warp request */
More information about the wine-cvs
mailing list