From cee28e19c7841e38c210b87bf06dadfc0358eaf6 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 2 Oct 2008 07:21:15 +0200 Subject: [PATCH] [layout] Add bool in client struct for maxlayout --- config.c | 2 +- event.c | 2 +- layout.c | 5 ++++- wmfs.c | 2 +- wmfs.h | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config.c b/config.c index 931cd86..678eb0a 100644 --- a/config.c +++ b/config.c @@ -305,7 +305,7 @@ init_conf(void) /* layout */ conf.nlayout = cfg_size(cfg_layouts, "layout"); - if(conf.nlayout > ) + if(conf.nlayout > 3) { printf("WMFS Configuration: Too much of layouts\n"); exit(EXIT_FAILURE); diff --git a/event.c b/event.c index 25a49fc..6d7da41 100644 --- a/event.c +++ b/event.c @@ -260,7 +260,7 @@ configurerequest(XEvent ev) Client *c; XWindowChanges wc; if((c = getclient(ev.xconfigurerequest.window))) - if(c->tile) + if(c->tile || c->lmax) return; wc.x = ev.xconfigurerequest.x; wc.y = ev.xconfigurerequest.y; diff --git a/layout.c b/layout.c index 40e6da2..12e6948 100644 --- a/layout.c +++ b/layout.c @@ -43,10 +43,11 @@ freelayout(void) { if(!ishide(c)) { - if(c->tile) + if(c->tile || c->lmax) { moveresize(c, c->ox, c->oy, c->ow, c->oh, True); c->tile = False; + c->lmax = False; } } } @@ -103,6 +104,7 @@ maxlayout(void) for(c = nexttiled(clients); c; c = nexttiled(c->next)) { c->tile = False; + c->lmax = True; c->ox = c->x; c->oy = c->y; c->ow = c->w; @@ -192,6 +194,7 @@ tile(void) for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next), i++) { c->max = False; + c->lmax = False; c->tile = True; c->ox = c->x; c->oy = c->y; c->ow = c->w; c->oh = c->h; diff --git a/wmfs.c b/wmfs.c index 4232470..ec3d7fa 100644 --- a/wmfs.c +++ b/wmfs.c @@ -583,7 +583,7 @@ mouseaction(Client *c, int x, int y, int type) int ocx, ocy; XEvent ev; - if(c->max || c->tile) + if(c->max || c->tile || c->lmax) return; ocx = c->x; diff --git a/wmfs.h b/wmfs.h index fbd3b9d..4210f02 100644 --- a/wmfs.h +++ b/wmfs.h @@ -85,7 +85,7 @@ struct Client Window tbar; /* Titlebar */ Window button; /* Close Button */ Bool max, tile, free; /* Client Info */ - Bool hint, hide; /* Client Info² */ + Bool hint, hide, lmax;/* Client Info² */ /* Struct in chains */ Client *next; /* Next client */ Client *prev; /* Previous client */