now tiled windows can be resized/moved, their floating state will be toggled implicitely d1ce3eac
Anselm R. Garbe · 2007-09-16 13:27 2 file(s) · +12 −8
dwm.1 +2 −2
117 117
.SS Mouse commands
118 118
.TP
119 119
.B Mod1\-Button1
120 -
Move current window while dragging (floating layout only).
120 +
Move current window while dragging. Tiled windows will be toggled to the floating state.
121 121
.TP
122 122
.B Mod1\-Button2
123 123
Zooms/cycles current window to/from master area (tiled layout only).
124 124
.TP
125 125
.B Mod1\-Button3
126 -
Resize current window while dragging (floating layout only).
126 +
Resize current window while dragging. Tiled windows will be toggled to the floating state.
127 127
.SH CUSTOMIZATION
128 128
dwm is customized by creating a custom config.h and (re)compiling the source
129 129
code. This keeps it fast, secure and simple.
dwm.c +10 −6
335 335
		focus(c);
336 336
		if(CLEANMASK(ev->state) != MODKEY)
337 337
			return;
338 -
		if(ev->button == Button1 && (isarrange(floating) || c->isfloating)) {
339 -
			restack();
338 +
		if(ev->button == Button1) {
339 +
			if(!isarrange(floating) && !c->isfloating)
340 +
				togglefloating(NULL);
341 +
			else
342 +
				restack();
340 343
			movemouse(c);
341 344
		}
342 345
		else if(ev->button == Button2)
343 346
			zoom(NULL);
344 -
		else if(ev->button == Button3
345 -
		&& (isarrange(floating) || c->isfloating) && !c->isfixed)
346 -
		{
347 -
			restack();
347 +
		else if(ev->button == Button3 && !c->isfixed) {
348 +
			if(!isarrange(floating) && !c->isfloating)
349 +
				togglefloating(NULL);
350 +
			else
351 +
				restack();
348 352
			resizemouse(c);
349 353
		}
350 354
	}