[metacity] frames: don't include invisible area in cache



commit 8ae6ac580581b497065c077d1bf1af9355611ebe
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jun 8 12:36:20 2016 +0300

    frames: don't include invisible area in cache

 src/ui/frames.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index f950cb5..50bbf3e 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2097,28 +2097,30 @@ populate_cache (MetaFrames *frames,
    * size without any border added. */
 
   /* top */
-  pixels->piece[0].rect.x = 0;
-  pixels->piece[0].rect.y = 0;
-  pixels->piece[0].rect.width = width + borders.total.left + borders.total.right;
-  pixels->piece[0].rect.height = borders.total.top;
+  pixels->piece[0].rect.x = borders.invisible.left - borders.shadow.left;
+  pixels->piece[0].rect.y = borders.invisible.top - borders.shadow.top;
+  pixels->piece[0].rect.width = width + borders.visible.left + borders.shadow.left +
+                                borders.visible.right + borders.shadow.right;
+  pixels->piece[0].rect.height = borders.visible.top + borders.shadow.top;
 
   /* left */
-  pixels->piece[1].rect.x = 0;
+  pixels->piece[1].rect.x = borders.invisible.left - borders.shadow.left;
   pixels->piece[1].rect.y = borders.total.top;
   pixels->piece[1].rect.height = height;
-  pixels->piece[1].rect.width = borders.total.left;
+  pixels->piece[1].rect.width = borders.visible.left + borders.shadow.left;
 
   /* right */
   pixels->piece[2].rect.x = borders.total.left + width;
   pixels->piece[2].rect.y = borders.total.top;
-  pixels->piece[2].rect.width = borders.total.right;
+  pixels->piece[2].rect.width = borders.visible.right  + borders.shadow.right;
   pixels->piece[2].rect.height = height;
 
   /* bottom */
-  pixels->piece[3].rect.x = 0;
+  pixels->piece[3].rect.x = borders.invisible.left - borders.shadow.left;
   pixels->piece[3].rect.y = borders.total.top + height;
-  pixels->piece[3].rect.width = width + borders.total.left + borders.total.right;
-  pixels->piece[3].rect.height = borders.total.bottom;
+  pixels->piece[3].rect.width = width + borders.visible.left + borders.shadow.left +
+                                borders.visible.right + borders.shadow.right;
+  pixels->piece[3].rect.height = borders.visible.bottom + borders.shadow.bottom;
 
   for (i = 0; i < 4; i++)
     {


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