diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c index d5d8e21b0..5e451ca58 100644 --- a/src/wayland/meta-window-wayland.c +++ b/src/wayland/meta-window-wayland.c @@ -210,8 +210,17 @@ meta_window_wayland_move_resize_internal (MetaWindow *window, * coordinate space so that we can have a scale independent size to pass * to the Wayland surface. */ geometry_scale = meta_window_wayland_get_geometry_scale (window); - configured_width = constrained_rect.width / geometry_scale; - configured_height = constrained_rect.height / geometry_scale; + if (flags & META_MOVE_RESIZE_UNMAXIMIZE) + { + /* On un-maximize, let the client decide on its size */ + configured_width = 0; + configured_height = 0; + } + else + { + 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