diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 6ef1e076a1..f2e2841bd4 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -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: diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 6c56b1563e..70cdd86bcf 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -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 ); } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index ca7a379538..a14fa39155 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -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 */