mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
winex11: Allow MotionNotify events through occasionally while XInput is active.
This commit is contained in:
parent
fd4ad5a604
commit
8e9b4e0a5c
@ -323,10 +323,14 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next )
|
||||
switch (next->type)
|
||||
{
|
||||
case MotionNotify:
|
||||
if (next->xany.window == x11drv_thread_data()->clip_window)
|
||||
{
|
||||
TRACE( "ignoring MotionNotify for clip window\n" );
|
||||
return MERGE_IGNORE;
|
||||
struct x11drv_thread_data *thread_data = x11drv_thread_data();
|
||||
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:
|
||||
|
@ -547,11 +547,6 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
|
||||
if (thread_data->clip_window != window) return;
|
||||
input->u.mi.dx += clip_rect.left;
|
||||
input->u.mi.dy += clip_rect.top;
|
||||
if (!(input->u.mi.dwFlags & ~(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE)))
|
||||
{
|
||||
/* motion events are ignored when xinput2 is active */
|
||||
if (thread_data->xi2_state == xi_enabled) return;
|
||||
}
|
||||
__wine_send_input( hwnd, input );
|
||||
return;
|
||||
}
|
||||
@ -1366,6 +1361,13 @@ void X11DRV_MotionNotify( HWND hwnd, XEvent *xev )
|
||||
input.u.mi.time = EVENT_x11_time_to_win32_time( event->time );
|
||||
input.u.mi.dwExtraInfo = 0;
|
||||
|
||||
if (!hwnd)
|
||||
{
|
||||
struct x11drv_thread_data *thread_data = x11drv_thread_data();
|
||||
if (event->time - thread_data->last_motion_notify < 1000) return;
|
||||
thread_data->last_motion_notify = event->time;
|
||||
}
|
||||
|
||||
send_mouse_input( hwnd, event->window, event->state, &input );
|
||||
}
|
||||
|
||||
|
@ -548,6 +548,7 @@ 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 */
|
||||
Window clip_window; /* window used for cursor clipping */
|
||||
|
Loading…
Reference in New Issue
Block a user