mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Wayland: Set window parent before commit
Fixes a timing issue where dialogs got configured right before having their parent set. This gave compositors the time to resize/rearrange the dialog as if it were a normal window, only to be marked as "floating" right away. On niri, this manifested as huge dialog windows. This is achieved with the addition of a `p_parent_id` parameter to `window_create`, akin to its popup counterpart. `window_create` now also accepts a single `Size2i` parameter instead of two integers, in line with the rest of the `WaylandThread` API. The original idea was to have a very "barebones" API, akin to the `drivers/` directory, but that didn't pan out.
This commit is contained in:
parent
f50d7fa1e8
commit
4df96fc7ab
3 changed files with 11 additions and 9 deletions
|
|
@ -1032,7 +1032,7 @@ public:
|
|||
|
||||
void set_icon(const Ref<Image> &p_icon);
|
||||
|
||||
void window_create(DisplayServer::WindowID p_window_id, int p_width, int p_height);
|
||||
void window_create(DisplayServer::WindowID p_window_id, const Size2i &p_size, DisplayServer::WindowID p_parent_id = DisplayServer::INVALID_WINDOW_ID);
|
||||
void window_create_popup(DisplayServer::WindowID p_window_id, DisplayServer::WindowID p_parent_id, Rect2i p_rect);
|
||||
void window_destroy(DisplayServer::WindowID p_window_Id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue