diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-10-27 15:23:40 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-10-27 15:24:09 -0700 |
commit | ba96fc6a4dff123c748d7c554147f8ade047f76c (patch) | |
tree | d02bb1121b0c514058f1bdbc3836c07f92839a77 /platform/linuxbsd/display_server_x11.h | |
parent | 24fdedfe948a918b5a67846f7962f83ba0e59258 (diff) | |
download | redot-engine-ba96fc6a4dff123c748d7c554147f8ade047f76c.tar.gz |
Fix input events random delay on X11
The new system based on a thread gathering events from the X11 server
was causing delays in some scenarios where some events have just been
missed at the time of processing and we're waiting for a whole frame to
check them again.
Solved by flushing again and checking for pending events at the
beginning of the process loop, in addition to events already gathered
on the event thread.
Diffstat (limited to 'platform/linuxbsd/display_server_x11.h')
-rw-r--r-- | platform/linuxbsd/display_server_x11.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h index ded481f613..eb7725b768 100644 --- a/platform/linuxbsd/display_server_x11.h +++ b/platform/linuxbsd/display_server_x11.h @@ -268,6 +268,7 @@ class DisplayServerX11 : public DisplayServer { static void _poll_events_thread(void *ud); bool _wait_for_events() const; void _poll_events(); + void _check_pending_events(LocalVector<XEvent> &r_events); static Bool _predicate_all_events(Display *display, XEvent *event, XPointer arg); static Bool _predicate_clipboard_selection(Display *display, XEvent *event, XPointer arg); |