godot/platform
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
..
android Organize ifdefs for disabling navigation, physics, and XR 2025-04-02 08:24:24 -07:00
ios Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
linuxbsd Wayland: Implement native sub-windows 2025-04-04 20:23:25 +02:00
macos Merge pull request #104850 from Repiteo/core/warning-macros 2025-04-03 16:50:22 -05:00
web Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
windows Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
register_platform_apis.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
SCsub SCons: Make builders prettier, utilize constexpr 2025-03-11 18:31:20 -05:00