window: Fix get_client_area_rect for the frame rect conversion

Specifically for CSD windows -- this was just absolutely wrong
before. This fixes weird painting and clipping artifacts for
CSD windows.
This commit is contained in:
Jasper St. Pierre 2014-06-27 11:56:52 -04:00
parent 8d29d22e99
commit f1d8428650

View File

@ -4183,8 +4183,8 @@ meta_window_get_outer_rect (const MetaWindow *window,
* @rect: (out): pointer to a cairo rectangle * @rect: (out): pointer to a cairo rectangle
* *
* Gets the rectangle for the boundaries of the client area, relative * Gets the rectangle for the boundaries of the client area, relative
* to the frame. If the window is shaded, the height of the rectangle * to the buffer rect. If the window is shaded, the height of the
* is 0. * rectangle is 0.
*/ */
void void
meta_window_get_client_area_rect (const MetaWindow *window, meta_window_get_client_area_rect (const MetaWindow *window,
@ -4197,11 +4197,11 @@ meta_window_get_client_area_rect (const MetaWindow *window,
rect->x = borders.total.left; rect->x = borders.total.left;
rect->y = borders.total.top; rect->y = borders.total.top;
rect->width = window->rect.width - borders.visible.left - borders.visible.right; rect->width = window->buffer_rect.width - borders.total.left - borders.total.right;
if (window->shaded) if (window->shaded)
rect->height = 0; rect->height = 0;
else else
rect->height = window->rect.height - borders.visible.top - borders.visible.bottom; rect->height = window->buffer_rect.height - borders.total.top - borders.total.bottom;
} }
void void