window/wayland: Use constrained size when unmaximizing while fullscreen

Otherwise we'll ask the client to use the size 0x0 with the fullscreen
state set.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/621
This commit is contained in:
Jonas Ådahl 2019-06-13 10:34:23 +02:00 committed by Georges Basile Stavracas Neto
parent 9213574870
commit 425611eadf

View File

@ -217,9 +217,10 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
* coordinate space so that we can have a scale independent size to pass * coordinate space so that we can have a scale independent size to pass
* to the Wayland surface. */ * to the Wayland surface. */
geometry_scale = meta_window_wayland_get_geometry_scale (window); geometry_scale = meta_window_wayland_get_geometry_scale (window);
if (flags & META_MOVE_RESIZE_UNMAXIMIZE)
if (flags & META_MOVE_RESIZE_UNMAXIMIZE &&
!meta_window_is_fullscreen (window))
{ {
/* On un-maximize, let the client decide on its size */
configured_width = 0; configured_width = 0;
configured_height = 0; configured_height = 0;
} }