Signed-off-by: Byeongsik Jeon bsjeon@hanmail.net --- v4: add new patch
XFilterEvent() invoked "xim callbacks" can also be treated as event handlers.
dlls/winex11.drv/event.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index a744ce7e4e5..02fb37eec05 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -424,13 +424,19 @@ static BOOL process_events( Display *display, Bool (*filter)(Display*, XEvent*,X int count = 0; BOOL queued = FALSE; enum event_merge_action action = MERGE_DISCARD; + struct x11drv_thread_data *thread_data = x11drv_thread_data();
prev_event.type = 0; while (XCheckIfEvent( display, &event, filter, (char *)arg )) { + XEvent *prev = thread_data->current_event; + thread_data->current_event = &event; count++; if (XFilterEvent( &event, None )) { + thread_data->current_event = prev; + queued = TRUE; + /* * SCIM on linux filters key events strangely. It does not filter the * KeyPress events for these keys however it does filter the @@ -459,6 +465,7 @@ static BOOL process_events( Display *display, Bool (*filter)(Display*, XEvent*,X else continue; /* filtered, ignore it */ } + thread_data->current_event = prev;
get_event_data( &event ); action = merge_events( &prev_event, &event );