[3.2] Fix issues related to delay when processing events on Linux #42341
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3.2 backport of PR #41910:
Fix general keyboard input lag on X11 display server
Fix delay to process clipboard content from Godot in other programs
Fixes some issues on the 3.2 branch: #31177, #39422
See original PR for more details.
Implementation is almost identical as 4.0, except for:
-
LocalVector
backported from master, also requires some changes inerror_macros
to add missing macros.-
XInitThreads
now called even with render on the main thread, because we need xlib to be initialized for multi-threading for polling events from the x server on a separate thread.-
OS::get_clipboard()
is used instead ofinternal_clipboard
which doesn't exist in this implementation.CC @hpvb