summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-09-16 13:27:33 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-09-16 13:27:33 +0200
commitd1ce3eac33a636e03a1f5a887897ae8046065ff7 (patch)
treebcba3cb581aa8212960514143dd88f98af486b8e
parentsome more rearrangements (diff)
downloaddwm-d1ce3eac33a636e03a1f5a887897ae8046065ff7.tar.gz
dwm-d1ce3eac33a636e03a1f5a887897ae8046065ff7.zip
now tiled windows can be resized/moved, their floating state will be toggled implicitely
-rw-r--r--dwm.14
-rw-r--r--dwm.c16
2 files changed, 12 insertions, 8 deletions
diff --git a/dwm.1 b/dwm.1
index cf197f5..d82c387 100644
--- a/dwm.1
+++ b/dwm.1
@@ -117,13 +117,13 @@ Quit dwm.
117.SS Mouse commands 117.SS Mouse commands
118.TP 118.TP
119.B Mod1\-Button1 119.B Mod1\-Button1
120Move current window while dragging (floating layout only). 120Move current window while dragging. Tiled windows will be toggled to the floating state.
121.TP 121.TP
122.B Mod1\-Button2 122.B Mod1\-Button2
123Zooms/cycles current window to/from master area (tiled layout only). 123Zooms/cycles current window to/from master area (tiled layout only).
124.TP 124.TP
125.B Mod1\-Button3 125.B Mod1\-Button3
126Resize current window while dragging (floating layout only). 126Resize current window while dragging. Tiled windows will be toggled to the floating state.
127.SH CUSTOMIZATION 127.SH CUSTOMIZATION
128dwm is customized by creating a custom config.h and (re)compiling the source 128dwm is customized by creating a custom config.h and (re)compiling the source
129code. This keeps it fast, secure and simple. 129code. This keeps it fast, secure and simple.
diff --git a/dwm.c b/dwm.c
index 9932974..164b5ef 100644
--- a/dwm.c
+++ b/dwm.c
@@ -335,16 +335,20 @@ buttonpress(XEvent *e) {
335 focus(c); 335 focus(c);
336 if(CLEANMASK(ev->state) != MODKEY) 336 if(CLEANMASK(ev->state) != MODKEY)
337 return; 337 return;
338 if(ev->button == Button1 && (isarrange(floating) || c->isfloating)) { 338 if(ev->button == Button1) {
339 restack(); 339 if(!isarrange(floating) && !c->isfloating)
340 togglefloating(NULL);
341 else
342 restack();
340 movemouse(c); 343 movemouse(c);
341 } 344 }
342 else if(ev->button == Button2) 345 else if(ev->button == Button2)
343 zoom(NULL); 346 zoom(NULL);
344 else if(ev->button == Button3 347 else if(ev->button == Button3 && !c->isfixed) {
345 && (isarrange(floating) || c->isfloating) && !c->isfixed) 348 if(!isarrange(floating) && !c->isfloating)
346 { 349 togglefloating(NULL);
347 restack(); 350 else
351 restack();
348 resizemouse(c); 352 resizemouse(c);
349 } 353 }
350 } 354 }