wayland: update location prior to maximize
When maximizing a window, the previous location is saved so that un-maximize would restore the same original window location. However, if a Wayland client starts with a window maximized, the previous location will be 0x0, so if we have to force placement in xdg_toplevel_set_maximized(), we should update the location as well so that the window is placed on the right monitor when un-maximizing. For that purpose, add a new flag to force the update of the window location, and use that flag from xdg_toplevel_set_maximized(). https://bugzilla.gnome.org/show_bug.cgi?id=783901
This commit is contained in:
@@ -232,7 +232,11 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
||||
* it can be for maximized or fullscreen.
|
||||
*/
|
||||
|
||||
if (flags & META_MOVE_RESIZE_WAYLAND_RESIZE)
|
||||
if (flags & META_MOVE_RESIZE_FORCE_MOVE)
|
||||
{
|
||||
can_move_now = TRUE;
|
||||
}
|
||||
else if (flags & META_MOVE_RESIZE_WAYLAND_RESIZE)
|
||||
{
|
||||
/* This is a call to wl_surface_commit(), ignore the constrained_rect and
|
||||
* update the real client size to match the buffer size.
|
||||
@@ -762,7 +766,7 @@ meta_window_place_with_placement_rule (MetaWindow *window,
|
||||
|
||||
window->unconstrained_rect.width = placement_rule->width;
|
||||
window->unconstrained_rect.height = placement_rule->height;
|
||||
meta_window_force_placement (window);
|
||||
meta_window_force_placement (window, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user