Skip to content

Commit

Permalink
Pass position to popups
Browse files Browse the repository at this point in the history
  • Loading branch information
Riteo committed Oct 22, 2024
1 parent 909415c commit d6f14ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions platform/linuxbsd/wayland/display_server_wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,13 @@ DisplayServer::WindowID DisplayServerWayland::create_sub_window(WindowMode p_mod
// NOTE: DO **NOT** SET A POSITION. Wayland does not track them for toplevels
// and we're gonna get our events transformed in unexpected ways.
wd.rect.size = p_rect.size;

// I mean, popups need it :P
// FIXME super rough heuristic
if (p_flags | WINDOW_FLAG_RESIZE_DISABLED) {
wd.rect.position = p_rect.position;
}

wd.title = "Godot";
wd.parent_id = p_transient_parent;
return id;
Expand Down

0 comments on commit d6f14ec

Please sign in to comment.