37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
|
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
|