diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2017-06-21 11:33:18 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2018-01-11 11:03:04 +0100 |
commit | 6cf7d2d47fb0263cd056f91bfc96020af95b1b4b (patch) | |
tree | 08c591738aeea85c04137d1e03c0b390b50a1dd0 | |
parent | 1139ace244b94e7007c7354d8872ddf694c9b29d (diff) | |
download | mutter-6cf7d2d47fb0263cd056f91bfc96020af95b1b4b.tar.gz |
wayland: Do not enforce a size on un-maximize
When un-maximizing, use a zero size to pass to the client so that it can
use the right un-maximized size that fits.
https://bugzilla.gnome.org/show_bug.cgi?id=783901
-rw-r--r-- | src/wayland/meta-window-wayland.c | 13 |
1 files changed, 11 insertions, 2 deletions
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 |