godot/platform/linuxbsd/wayland
Riteo 84d3adcf2f Wayland: Implement native sub-windows
The backend is now mature enough to not explode with multiple windows
but the `DisplayServer` API still cannot meet some guarantees required
by the various Wayland protocols we use. To meet those guarantees this
patch adds three new elements to the DisplayServer API, with relative
handling logic for `Window` and `Popup` nodes:

 - `WINDOW_EVENT_FORCE_CLOSE`, which tells a window to *forcefully*
close itself and ensure a proper cleanup of its references, as Wayland
enforces this behavior;

 - `WINDOW_FLAG_POPUP_WM_HINT`, which explicitly declares a window as a
"popup", as Wayland enforces this distinction and heuristics are not
reliable enough;

 - `FEATURE_SELF_FITTING_WINDOWS`, which signals that the compositor can
fit windows to the screen automatically and that nodes should not do
that themselves.

Given the size of this feature, this patch also includes various
`WaylandThread` reworks and fixes including:

 - Improvements to frame wait logic, with fixes to various stalls and a
configurable (through a `#define`) timeout amount;

 - A proper implementation of `window_can_draw`;

 - Complete overhaul of pointer and tablet handling. Now everything is
always accumulated and handled only on each respective `frame` event.
This makes their logic simpler and more robust.

 - Better handling of pointer leaving and pointer enter/exit event
sending;

 - Keyboard focus tracking;

 - More solid window references using IDs instead of raw pointers as
windows can be deleted at any time;

 - More aggressive messaging to window nodes to enforce rects imposed by
the compositor.
2025-04-04 20:23:25 +02:00
..
dynwrappers Wayland: Fix build config with so_wrap disabled 2025-02-10 21:42:25 +01:00
detect_prime_egl.cpp EGL: Use EGL_EXT_platform_base whenever possible 2024-06-04 08:43:34 +02:00
detect_prime_egl.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
display_server_wayland.cpp Wayland: Implement native sub-windows 2025-04-04 20:23:25 +02:00
display_server_wayland.h Wayland: Implement native sub-windows 2025-04-04 20:23:25 +02:00
egl_manager_wayland.cpp Add Wayland support 2024-01-30 16:44:47 +01:00
egl_manager_wayland.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
egl_manager_wayland_gles.cpp Wayland: Add support for OpenGL ES driver 2024-05-03 05:17:13 +02:00
egl_manager_wayland_gles.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
key_mapping_xkb.cpp Wayland: Unstuck keys with same keycode 2025-02-11 13:16:16 +01:00
key_mapping_xkb.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
rendering_context_driver_vulkan_wayland.cpp Move Vulkan includes to a central godot_vulkan.h header 2024-09-29 17:53:18 +02:00
rendering_context_driver_vulkan_wayland.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
SCsub SCons: Properly NoCache all text files 2025-01-16 16:59:12 -06:00
wayland_thread.cpp Wayland: Implement native sub-windows 2025-04-04 20:23:25 +02:00
wayland_thread.h Wayland: Implement native sub-windows 2025-04-04 20:23:25 +02:00