mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 20:05:41 +00:00
winex11: Still process all MotionNotify events when using XInput2.
This commit is contained in:
parent
ef292465be
commit
9716d1c861
|
@ -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;
|
||||
}
|
||||
break;
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||
case GenericEvent:
|
||||
{
|
||||
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 (prev->xany.window == next->xany.window)
|
||||
{
|
||||
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 );
|
||||
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;
|
||||
case GenericEvent:
|
||||
if (prev->xcookie.extension != xinput2_opcode) break;
|
||||
if (prev->xcookie.evtype != XI_RawMotion) break;
|
||||
switch (next->type)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return MERGE_HANDLE;
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue