aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authoroga2009-09-25 15:57:49 +0000
committeroga2009-09-25 15:57:49 +0000
commiteb8553fcc65a68488f8e20a148245b0db1aa09ec (patch)
treea0dacac010455780d39f3e997ad74927e3a6a62f /client.c
parent198b293f7e26437c6d98c3a07dd2ef5b53d195a1 (diff)
downloadcwm-eb8553fcc65a68488f8e20a148245b0db1aa09ec.tar.gz
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@
Diffstat (limited to 'client.c')
-rw-r--r--client.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/client.c b/client.c
index f0a2260..0e6a8c0 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: client.c,v 1.64 2009/08/27 01:38:08 okan Exp $
+ * $Id: client.c,v 1.65 2009/09/25 15:57:49 oga Exp $
*/
#include "headers.h"
@@ -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);