mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
wayland/window: Provide prior floating window dimensions
Implements the "prior window window geometry dimensions" as described in the documentation of 'xdg_toplevel' request 'unset_maximized': "If available and applicable, the compositor will include the window geometry dimensions the window had prior to being maximized in the configure event." and 'unset_fullscreen': "The compositor may include the previous window geometry dimensions in the configure event, if applicable." Fixes https://gitlab.gnome.org/GNOME/mutter/issues/792.
This commit is contained in:
parent
f4a1dcfc93
commit
a93ef84d57
@ -256,24 +256,8 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
||||
* to the Wayland surface. */
|
||||
geometry_scale = meta_window_wayland_get_geometry_scale (window);
|
||||
|
||||
if (flags & META_MOVE_RESIZE_UNMAXIMIZE &&
|
||||
!meta_window_is_fullscreen (window))
|
||||
{
|
||||
configured_width = 0;
|
||||
configured_height = 0;
|
||||
}
|
||||
else if (flags & META_MOVE_RESIZE_UNFULLSCREEN &&
|
||||
!meta_window_get_maximized (window) &&
|
||||
meta_window_get_tile_mode (window) == META_TILE_NONE)
|
||||
{
|
||||
configured_width = 0;
|
||||
configured_height = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
configured_width = constrained_rect.width / geometry_scale;
|
||||
configured_height = constrained_rect.height / geometry_scale;
|
||||
}
|
||||
configured_width = constrained_rect.width / geometry_scale;
|
||||
configured_height = constrained_rect.height / geometry_scale;
|
||||
|
||||
/* For wayland clients, the size is completely determined by the client,
|
||||
* and while this allows to avoid some trickery with frames and the resulting
|
||||
|
Loading…
Reference in New Issue
Block a user