summaryrefslogtreecommitdiff
blob: c4e26a2a7de56faad7cd7e63424bb1d0e75e6dee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 79a275b240a98d9f64c8dd1e799e5d469ec8f204 Mon Sep 17 00:00:00 2001
From: Danny Baumann <dannybaumann@web.de>
Date: Wed, 20 Jan 2010 14:05:10 +0000
Subject: Fix window region calculation for windows that have border width set.

---
diff --git a/src/window.c b/src/window.c
index 90922d1..e7bb987 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1701,8 +1701,8 @@ updateWindowRegion (CompWindow *w)
     {
 	r.x      = -w->attrib.border_width;
 	r.y      = -w->attrib.border_width;
-	r.width  = w->width;
-	r.height = w->height;
+	r.width  = w->attrib.width + w->attrib.border_width;
+	r.height = w->attrib.height + w->attrib.border_width;
 
 	rects = &r;
 	n = 1;
@@ -1719,8 +1719,10 @@ updateWindowRegion (CompWindow *w)
     {
 	rect.extents.x1 = rects[i].x + w->attrib.border_width;
 	rect.extents.y1 = rects[i].y + w->attrib.border_width;
-	rect.extents.x2 = rect.extents.x1 + rects[i].width;
-	rect.extents.y2 = rect.extents.y1 + rects[i].height;
+	rect.extents.x2 = rect.extents.x1 + rects[i].width +
+			  w->attrib.border_width;
+	rect.extents.y2 = rect.extents.y1 + rects[i].height +
+			  w->attrib.border_width;
 
 	if (rect.extents.x1 < 0)
 	    rect.extents.x1 = 0;
--
cgit v0.8.2