summary refs log tree commit diff
diff options
context:
space:
mode:
authoroga <oga>2009-09-25 15:57:49 +0000
committeroga <oga>2009-09-25 15:57:49 +0000
commit85d8697676f81a863b980e12ba0bf7a132f641cf (patch)
tree7cab9c43a356e03377620290a38846c3c3bfb8c6
parent4af6a60d849f7023a9b3622cb57731898a7f72f3 (diff)
downloadcwm-85d8697676f81a863b980e12ba0bf7a132f641cf.tar.gz
cwm-85d8697676f81a863b980e12ba0bf7a132f641cf.tar.xz
cwm-85d8697676f81a863b980e12ba0bf7a132f641cf.zip
With Xinerama enabled, the borders of a maximized window will show up on
all adjacent screens. This patch hides the borders while the window is
maximized.

From Bertrand Janin; thanks!

ok okan@
-rw-r--r--client.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/client.c b/client.c
index 10dbdb9..6cf1d5b 100644
--- a/client.c
+++ b/client.c
@@ -244,8 +244,8 @@ client_maximize(struct client_ctx *cc)
 			ymax = xine->height;
 		}
 calc:
-		cc->geom.x = x_org - cc->bwidth + Conf.gap_left;
-		cc->geom.y = y_org - cc->bwidth + Conf.gap_top;
+		cc->geom.x = x_org + Conf.gap_left;
+		cc->geom.y = y_org + Conf.gap_top;
 		cc->geom.height = ymax - (Conf.gap_top + Conf.gap_bottom);
 		cc->geom.width = xmax - (Conf.gap_left + Conf.gap_right);
 		cc->flags |= CLIENT_DOMAXIMIZE;
@@ -323,6 +323,7 @@ client_resize(struct client_ctx *cc)
 	    CLIENT_HMAXIMIZED);
 
 	if (cc->flags & CLIENT_DOMAXIMIZE) {
+		cc->bwidth = 0;
 		cc->flags &= ~CLIENT_DOMAXIMIZE;
 		cc->flags |= CLIENT_MAXIMIZED;
 	} else if (cc->flags & CLIENT_DOVMAXIMIZE) {
@@ -331,8 +332,12 @@ client_resize(struct client_ctx *cc)
 	} else if (cc->flags & CLIENT_DOHMAXIMIZE) {
 		cc->flags &= ~CLIENT_DOHMAXIMIZE;
 		cc->flags |= CLIENT_HMAXIMIZED;
+	} else {
+		cc->bwidth = Conf.bwidth;
 	}
 
+	client_draw_border(cc);
+
 	XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
 	    cc->geom.y, cc->geom.width, cc->geom.height);
 	xev_reconfig(cc);