Skip to content

Commit

Permalink
Update window rect when creating toplevel
Browse files Browse the repository at this point in the history
This one is a bit wild. Basically the fact that multiwin input for child
toplevels was basically a lot of luck.

In short, the window node still believed it had a position and
transformed all input, confusing the hell out of it. This does not
happen on most "modern" compositors as they implement fractional
scaling, which triggers a rect update, but Weston did not include that
protocol and never sent the update.

Well, that's what a reference compositor is for, right? :P
  • Loading branch information
Riteo committed Jan 19, 2025
1 parent 0e53557 commit b3c9662
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform/linuxbsd/wayland/display_server_wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ void DisplayServerWayland::show_window(WindowID p_window_id) {
if (wd.parent_id != INVALID_WINDOW_ID) {
wayland_thread.window_set_parent(wd.id, wd.parent_id);
}

// The window node believes it can have a position. It can't. Let's tell it
// the news by sending it the actual rect.
if (wd.rect_changed_callback.is_valid()) {
wd.rect_changed_callback.call(wd.rect);
}
} else {
DEBUG_LOG_WAYLAND("!!!!! Making popup !!!!!");

Expand Down

0 comments on commit b3c9662

Please sign in to comment.