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.
This commit is contained in:
Jasper St. Pierre 2014-05-21 12:21:05 -04:00
parent 6c37f6e601
commit 2b798511de
2 changed files with 6 additions and 6 deletions

View File

@ -632,8 +632,9 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
width = client_width + borders.total.left + borders.total.right; width = client_width + borders.total.left + borders.total.right;
height = ((flags & META_FRAME_SHADED) ? 0: client_height) + height = borders.total.top + borders.total.bottom;
borders.total.top + borders.total.bottom; if (!(flags & META_FRAME_SHADED))
height += client_height;
fgeom->width = width; fgeom->width = width;
fgeom->height = height; fgeom->height = height;

View File

@ -1045,10 +1045,9 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
new_w = window->rect.width + borders.total.left + borders.total.right; new_w = window->rect.width + borders.total.left + borders.total.right;
if (window->shaded) new_h = borders.total.top + borders.total.bottom;
new_h = borders.total.top; if (!window->shaded)
else new_h += window->rect.height;
new_h = window->rect.height + borders.total.top + borders.total.bottom;
frame_size_dx = new_w - window->frame->rect.width; frame_size_dx = new_w - window->frame->rect.width;
frame_size_dy = new_h - window->frame->rect.height; frame_size_dy = new_h - window->frame->rect.height;