Bertrand Janin wrote :
> 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.
> 
> Bertrand
> 
> [demime 1.01d removed an attachment of type text/x-diff]

And here is the patch.

Index: client.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/client.c,v
retrieving revision 1.64
diff -p -u -r1.64 client.c
--- client.c    27 Aug 2009 01:38:08 -0000      1.64
+++ client.c    1 Sep 2009 03:08:33 -0000
@@ -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,7 +332,11 @@ 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);

Reply via email to