summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-21 12:21:05 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-05-21 12:21:05 -0400
commit2b798511deae663fbe72f5f9e57206a5ad686a6a (patch)
tree543add1ec203fff2502716451403fcd3d1c22e19
parent6c37f6e601717b39c728d87420cbc70954847e6a (diff)
downloadmutter-2b798511deae663fbe72f5f9e57206a5ad686a6a.tar.gz
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.
-rw-r--r--src/ui/theme.c5
-rw-r--r--src/x11/window-x11.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index c0a9221fa..a17af8109 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 c24e26e8c..b5af98ae1 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;