I've modified the proposed patch to not touch merge_events(). I don't think any reason to keep it in prev_event for non-mergeable events, but maybe there's an intent I'm not aware of.
``` diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 4ec37185751..8b25ed0e14e 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -364,6 +364,19 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) }
+static BOOL is_mergeable( XEvent *prev, XEvent *next ) +{ + if (next->type == ConfigureNotify || + next->type == MotionNotify || + next->type == GenericEvent) return TRUE; + + if (prev->type == ConfigureNotify && + (next->type == Expose || next->type == PropertyNotify)) return TRUE; + + return FALSE; +} + + /*********************************************************************** * call_event_handler */ @@ -442,6 +455,19 @@ static BOOL process_events( Display *display, Bool (*filter)(Display*, XEvent*,X else continue; /* filtered, ignore it */ } + + if (!is_mergeable( &prev_event, &event )) + { + if (prev_event.type) + { + queued |= call_event_handler( display, &prev_event ); + free_event_data( &prev_event ); + prev_event.type = 0; + } + queued |= call_event_handler( display, &event ); + continue; + } + get_event_data( &event ); if (prev_event.type) action = merge_events( &prev_event, &event ); switch( action ) ```
The patch with just the KeyPress, KeyRelease check instead of !is_mergeable() also works fine, so that's good too. It might be better to focus on the issue only.