[mutter] window: Fix get_client_area_rect for the frame rect conversion



commit f1d8428650bd1b80e1ea08460d39f2cd1ea546d4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jun 27 11:56:52 2014 -0400

    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 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index aa66665..1a8bdcf 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


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