summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-03-04 18:58:23 +0000
committerAnselm R Garbe <garbeam@gmail.com>2008-03-04 18:58:23 +0000
commit96ee9d888cc3cf90da3b6a6852d605255d25d020 (patch)
treed52b1bc9d77cc4e445d1676062af654cea489488 /dwm.c
parentfixed applyrules bug (diff)
downloaddwm-96ee9d888cc3cf90da3b6a6852d605255d25d020.tar.gz
dwm-96ee9d888cc3cf90da3b6a6852d605255d25d020.zip
monocle goes mainstream
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 897eeb4..b417167 100644
--- a/dwm.c
+++ b/dwm.c
@@ -153,6 +153,7 @@ void killclient(const char *arg);
153void manage(Window w, XWindowAttributes *wa); 153void manage(Window w, XWindowAttributes *wa);
154void mappingnotify(XEvent *e); 154void mappingnotify(XEvent *e);
155void maprequest(XEvent *e); 155void maprequest(XEvent *e);
156void monocle(void);
156void movemouse(Client *c); 157void movemouse(Client *c);
157Client *nexttiled(Client *c); 158Client *nexttiled(Client *c);
158void propertynotify(XEvent *e); 159void propertynotify(XEvent *e);
@@ -1072,6 +1073,16 @@ maprequest(XEvent *e) {
1072} 1073}
1073 1074
1074void 1075void
1076monocle(void) {
1077 Client *c;
1078
1079 domwfact = dozoom = False;
1080 for(c = clients; c; c = c->next)
1081 if(isvisible(c))
1082 resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
1083}
1084
1085void
1075movemouse(Client *c) { 1086movemouse(Client *c) {
1076 int x1, y1, ocx, ocy, di, nx, ny; 1087 int x1, y1, ocx, ocy, di, nx, ny;
1077 unsigned int dui; 1088 unsigned int dui;
@@ -1412,7 +1423,7 @@ setlayout(const char *arg) {
1412 } 1423 }
1413 else { 1424 else {
1414 for(i = 0; i < LENGTH(layouts); i++) 1425 for(i = 0; i < LENGTH(layouts); i++)
1415 if(arg == layouts[i].symbol) 1426 if(!strcmp(arg, layouts[i].symbol))
1416 break; 1427 break;
1417 if(i == LENGTH(layouts)) 1428 if(i == LENGTH(layouts))
1418 return; 1429 return;