[mutter] wayland: Do not enforce a size on un-maximize
- From: Olivier Fourdan <ofourdan src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [mutter] wayland: Do not enforce a size on un-maximize
 
- Date: Thu, 11 Jan 2018 10:05:48 +0000 (UTC)
 
commit 6cf7d2d47fb0263cd056f91bfc96020af95b1b4b
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Jun 21 11:33:18 2017 +0200
    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
 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 d5d8e21..5e451ca 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
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]