summaryrefslogtreecommitdiff
path: root/scene/3d/visual_instance_3d.h
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2020-09-09 12:43:20 +0200
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2020-09-24 16:01:41 +0200
commit2c4d64102af61474f8a56db2c347f50ce1629c61 (patch)
treeb025490670c5a61099379bd16155917ad48c6588 /scene/3d/visual_instance_3d.h
parent78304b904ffd4816a3f2957fb3ddf2b20a13d66a (diff)
Fix general keyboard input lag on X11 display server
This change makes keyboard inputs more responsive on Linux, especially when the FPS is lower on slower configurations. Polling events from the x server is done on a separate thread to avoid a frame delay with inputs, due to first sending the event to the input manager with XFilterEvent then processing the new event only on the next frame. Calls to Input Manager functions like XSetICFocus, XUnsetICFocus and XSetICValues use a mutex, because they are polling events internally and would otherwise interfere with our own thread process for polling events which can cause a deadlock in some cases. XUnsetICFocus is called instead of XSetICFocus on FocusOut events, so the input manager can be properly notified of focus changes. clipboard_get now uses a blocking call to poll for a specific event type when waiting for a SelectionNotify event, instead of polling all events and filtering them afterwards.
Diffstat (limited to 'scene/3d/visual_instance_3d.h')
0 files changed, 0 insertions, 0 deletions