changeset: 2411:16f26d05a13a
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Dec 09 19:23:34 2008 -0500
files: cmd/wmii/frame.c cmd/wmii/root.c config.mk
description:
Fix annoying Xinerama pointer constraint bug.
diff -r f366155f13ba -r 16f26d05a13a cmd/wmii/frame.c
--- a/cmd/wmii/frame.c Tue Dec 09 18:06:10 2008 -0500
+++ b/cmd/wmii/frame.c Tue Dec 09 19:23:34 2008 -0500
@@ -647,7 +647,7 @@
inset = Dy(screen->brect);
/*
* FIXME: This will cause problems for windows with
- * D(r) < 2 * isect
+ * D(r) < 2 * inset
*/
SET(best);
@@ -658,7 +658,7 @@
isect = rect_intersection(r, insetrect(s->r, inset));
if(Dx(isect) >= 0 && Dy(isect) >= 0)
return r;
- if(Dx(isect) < 0 && Dy(isect) < 0)
+ if(Dx(isect) <= 0 && Dy(isect) <= 0)
n = max(Dx(isect), Dy(isect));
else
n = min(Dx(isect), Dy(isect));
@@ -669,9 +669,10 @@
}
isect = insetrect(sbest->r, inset);
- p.x = min(r.max.x - isect.min.x, 0);
+ p = ZP;
+ p.x -= min(r.max.x - isect.min.x, 0);
p.x -= max(r.min.x - isect.max.x, 0);
- p.y = min(r.max.y - isect.min.y, 0);
+ p.y -= min(r.max.y - isect.min.y, 0);
p.y -= max(r.min.y - isect.max.y, 0);
return rectaddpt(r, p);
}
diff -r f366155f13ba -r 16f26d05a13a cmd/wmii/root.c
--- a/cmd/wmii/root.c Tue Dec 09 18:06:10 2008 -0500
+++ b/cmd/wmii/root.c Tue Dec 09 19:23:34 2008 -0500
@@ -66,7 +66,7 @@
Rectangle r, r2;
r = rectsetorigin(Rect(0, 0, 1, 1), Pt(e->x_root, e->y_root));
- r2 = constrain(r, 1);
+ r2 = constrain(r, 0);
if(!eqrect(r, r2))
warppointer(r2.min);
}
diff -r f366155f13ba -r 16f26d05a13a config.mk
--- a/config.mk Tue Dec 09 18:06:10 2008 -0500
+++ b/config.mk Tue Dec 09 19:23:34 2008 -0500
@@ -10,7 +10,7 @@
# Includes and libs
INCPATH = .:$(ROOT)/include:$(INCLUDE):/usr/include
-LIBS = -L/usr/lib -L$(ROOT)/lib
+LIBS = -L$(ROOT)/lib -L/usr/lib
# Flags
include $(ROOT)/mk/gcc.mk
Received on Wed Dec 10 2008 - 00:23:35 UTC
This archive was generated by hypermail 2.2.0 : Wed Dec 10 2008 - 00:24:04 UTC