From f1d8428650bd1b80e1ea08460d39f2cd1ea546d4 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 27 Jun 2014 11:56:52 -0400 Subject: [PATCH] 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. --- src/core/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index aa666656b..1a8bdcf6b 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -4183,8 +4183,8 @@ meta_window_get_outer_rect (const MetaWindow *window, * @rect: (out): pointer to a cairo rectangle * * Gets the rectangle for the boundaries of the client area, relative - * to the frame. If the window is shaded, the height of the rectangle - * is 0. + * to the buffer rect. If the window is shaded, the height of the + * rectangle is 0. */ void 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->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) rect->height = 0; 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