godot/platform/linuxbsd/x11
Dalton Lang 8a2e4409e6 [X11] Partial Fix Godot Editor and Project Manager steals focus on a window manager on Linux
This is a workaround for the most critical portion of the WM focus bug
described in #68305. On some specific X11 WM configurations, the
editor's main window and any popups it creates will fight for focus,
which causes a total system lockup due to mouse and keyboard input being
stolen as well. Getting out of this infinite loop requires force
restarting the system.

It can be tested with the following shell script:

```bash
	!#/bin/sh

	godot4 &
	sleep 30
	pkill -x godot4
```

The workaround identified in #68305 is to remove the call to
XSetInputFocus in the ConfigureNotify event handler, so I have removed
the conditional block that calls this as well as the setup code above it
since there is no need to allocate the memory for the variables if they
won't be used in that call anymore.

This is just a hack and is not a complete fix for #68305. Multiple
developers are collaborating on a proper fix in the discussion in that
issue, but time is a valuable resource that no one has enough of, so I
am committing this workaround as a stop-gap to prevent the most critical
problem while we work on a full solution for the underlying cause.
2024-02-05 17:00:24 -06:00
..
dynwrappers [X11] Add support for dead keys without active IME. Fix IME focus and cleanup. 2023-01-30 13:31:48 +02:00
detect_prime_x11.cpp [X11] Add fallback from desktop GL to GLES, suppress PRIME detector error spam. 2023-11-06 12:40:44 +02:00
detect_prime_x11.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
display_server_x11.cpp [X11] Partial Fix Godot Editor and Project Manager steals focus on a window manager on Linux 2024-02-05 17:00:24 -06:00
display_server_x11.h [Native File Dialog] Add support for adding custom options to the dialogs. 2024-01-24 15:00:31 +02:00
gl_manager_x11_egl.cpp [X11] Add support for using EGL/GLES instead of GLX. 2023-10-04 14:15:36 +03:00
gl_manager_x11_egl.h [X11] Add support for using EGL/GLES instead of GLX. 2023-10-04 14:15:36 +03:00
gl_manager_x11.cpp [X11] Add fallback from desktop GL to GLES, suppress PRIME detector error spam. 2023-11-06 12:40:44 +02:00
gl_manager_x11.h [X11] Add fallback from desktop GL to GLES, suppress PRIME detector error spam. 2023-11-06 12:40:44 +02:00
key_mapping_x11.cpp Add InputEventKey.location to tell left from right 2024-01-26 14:42:28 +01:00
key_mapping_x11.h Add InputEventKey.location to tell left from right 2024-01-26 14:42:28 +01:00
SCsub [X11] Add support for using EGL/GLES instead of GLX. 2023-10-04 14:15:36 +03:00
vulkan_context_x11.cpp Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts 2023-12-20 19:18:08 +01:00
vulkan_context_x11.h Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts 2023-12-20 19:18:08 +01:00