summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-01-10 11:05:38 +0100
committerDanny Baumann <dannybaumann@web.de>2009-01-10 11:05:38 +0100
commit43f781b9770e15a695c40cdf9d9b94e72e81946a (patch)
tree221e6e7ea0343354826afc16c9a14c9caf9443cf /src
parent1989f56e01fc0ec611679a4e86b1062f05b7acaf (diff)
Fix off-by-one errors in in-output check.
Diffstat (limited to 'src')
-rw-r--r--src/window.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c
index 876e0719..04a816d5 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1878,8 +1878,8 @@ updateWindowStruts (CompWindow *w)
strutY1 = new.left.y;
strutY2 = strutY1 + new.left.height;
- if (strutX2 > x1 && strutX2 <= x2 &&
- strutY1 <= y2 && strutY2 >= y1)
+ if (strutX2 > x1 && strutX2 <= x2 &&
+ strutY1 < y2 && strutY2 >= y1)
{
new.left.x = x1;
new.left.width = strutX2 - x1;
@@ -1890,8 +1890,8 @@ updateWindowStruts (CompWindow *w)
strutY1 = new.right.y;
strutY2 = strutY1 + new.right.height;
- if (strutX1 > x1 && strutX1 <= x2 &&
- strutY1 <= y2 && strutY2 >= y1)
+ if (strutX1 > x1 && strutX1 <= x2 &&
+ strutY1 < y2 && strutY2 >= y1)
{
new.right.x = strutX1;
new.right.width = x2 - strutX1;
@@ -1902,8 +1902,8 @@ updateWindowStruts (CompWindow *w)
strutY1 = new.top.y;
strutY2 = strutY1 + new.top.height;
- if (strutX1 <= x2 && strutX2 >= x1 &&
- strutY2 > y1 && strutY2 <= y2)
+ if (strutX1 < x2 && strutX2 >= x1 &&
+ strutY2 > y1 && strutY2 <= y2)
{
new.top.y = y1;
new.top.height = strutY2 - y1;
@@ -1914,8 +1914,8 @@ updateWindowStruts (CompWindow *w)
strutY1 = new.bottom.y;
strutY2 = strutY1 + new.bottom.height;
- if (strutX1 <= x2 && strutX2 >= x1 &&
- strutY1 > y1 && strutY1 <= y2)
+ if (strutX1 < x2 && strutX2 >= x1 &&
+ strutY1 > y1 && strutY1 <= y2)
{
new.bottom.y = strutY1;
new.bottom.height = y2 - strutY1;