summary refs log tree commit diff
path: root/xevents.c
diff options
context:
space:
mode:
authorokan <okan>2009-01-22 19:01:56 +0000
committerokan <okan>2009-01-22 19:01:56 +0000
commit87964e5c7e4cfa96f34187a993d10cc5ec37e881 (patch)
tree5c1f70d96c0949bba81a2fe8a34826bf95ad5433 /xevents.c
parente2399760789158633a6d2fa95aad274021ccdd8b (diff)
downloadcwm-87964e5c7e4cfa96f34187a993d10cc5ec37e881.tar.gz
cwm-87964e5c7e4cfa96f34187a993d10cc5ec37e881.tar.xz
cwm-87964e5c7e4cfa96f34187a993d10cc5ec37e881.zip
now that pwin is gone gone gone, we no longer have to do the bwidth
dance; xevents now able to deal with a border being set (which fixes
those annoying movie-watching apps).

ok todd@, oga@
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/xevents.c b/xevents.c
index ee251dc..788086e 100644
--- a/xevents.c
+++ b/xevents.c
@@ -111,19 +111,19 @@ xev_handle_configurerequest(struct xevent *xev, XEvent *ee)
 			cc->geom.x = e->x;
 		if (e->value_mask & CWY)
 			cc->geom.y = e->y;
+		if (e->value_mask & CWBorderWidth)
+			wc.border_width = e->border_width;
 
-		if (cc->geom.x == 0 &&
-		    cc->geom.width >= DisplayWidth(X_Dpy, sc->which))
+		if (cc->geom.x == 0 && cc->geom.width >= sc->xmax)
 			cc->geom.x -= cc->bwidth;
 
-		if (cc->geom.y == 0 &&
-		    cc->geom.height >= DisplayHeight(X_Dpy, sc->which))
+		if (cc->geom.y == 0 && cc->geom.height >= sc->ymax)
 			cc->geom.y -= cc->bwidth;
 
-		wc.x = cc->geom.x - cc->bwidth;
-		wc.y = cc->geom.y - cc->bwidth;
-		wc.width = cc->geom.width + cc->bwidth*2;
-		wc.height = cc->geom.height + cc->bwidth*2;
+		wc.x = cc->geom.x;
+		wc.y = cc->geom.y;
+		wc.width = cc->geom.width;
+		wc.height = cc->geom.height;
 		wc.border_width = cc->bwidth;
 
 		XConfigureWindow(X_Dpy, cc->win, e->value_mask, &wc);
@@ -134,6 +134,7 @@ xev_handle_configurerequest(struct xevent *xev, XEvent *ee)
 		wc.y = e->y;
 		wc.width = e->width;
 		wc.height = e->height;
+		wc.border_width = e->border_width;
 		wc.stack_mode = Above;
 		e->value_mask &= ~CWStackMode;