[mutter] window-x11: Consistently include the bottom border on shaded windows



commit 2b798511deae663fbe72f5f9e57206a5ad686a6a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed May 21 12:21:05 2014 -0400

    window-x11: Consistently include the bottom border on shaded windows
    
    We already do it in the theme code, but not the actual WM code. Since
    we include the left/right borders, it only seems fair to include the
    bottom border.
    
    This effectively makes it so that shading a window means that the
    client window "slot" has 0 height.

 src/ui/theme.c       |    5 +++--
 src/x11/window-x11.c |    7 +++----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index c0a9221..a17af81 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -632,8 +632,9 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout  *layout,
 
   width = client_width + borders.total.left + borders.total.right;
 
-  height = ((flags & META_FRAME_SHADED) ? 0: client_height) +
-    borders.total.top + borders.total.bottom;
+  height = borders.total.top + borders.total.bottom;
+  if (!(flags & META_FRAME_SHADED))
+    height += client_height;
 
   fgeom->width = width;
   fgeom->height = height;
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index c24e26e..b5af98a 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -1045,10 +1045,9 @@ meta_window_x11_move_resize_internal (MetaWindow                *window,
 
       new_w = window->rect.width + borders.total.left + borders.total.right;
 
-      if (window->shaded)
-        new_h = borders.total.top;
-      else
-        new_h = window->rect.height + borders.total.top + borders.total.bottom;
+      new_h = borders.total.top + borders.total.bottom;
+      if (!window->shaded)
+        new_h += window->rect.height;
 
       frame_size_dx = new_w - window->frame->rect.width;
       frame_size_dy = new_h - window->frame->rect.height;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]