reversed Andreas Amann's fullscreen fix with the approach proposed by Gary Langshaw: 820cbb35
- idea is not supporting movemouse/resizemouse/togglefloating for fullscreen windows
- as fullscreen windows are broken anyways, they should only be adjusted by their own means
anselm@garbe.us · 2012-06-23 09:06 1 file(s) · +10 −11
dwm.c +10 −11
575 575
	XConfigureEvent *ev = &e->xconfigure;
576 576
	Bool dirty;
577 577
578 +
	// TODO: updategeom handling sucks, needs to be simplified
578 579
	if(ev->window == root) {
579 -
		dirty = (sw != ev->width);
580 +
		dirty = (sw != ev->width || sh != ev->height);
580 581
		sw = ev->width;
581 582
		sh = ev->height;
582 583
		if(updategeom() || dirty) {
1235 1236
1236 1237
	if(!(c = selmon->sel))
1237 1238
		return;
1239 +
	if(c->isfullscreen) /* no support moving fullscreen windows by mouse */
1240 +
		return;
1238 1241
	restack(selmon);
1239 1242
	ocx = c->x;
1240 1243
	ocy = c->y;
1268 1271
				&& (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
1269 1272
					togglefloating(NULL);
1270 1273
			}
1271 -
			if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) {
1272 -
				if(c->isfullscreen)
1273 -
					setfullscreen(c, False);
1274 +
			if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
1274 1275
				resize(c, nx, ny, c->w, c->h, True);
1275 -
			}
1276 1276
			break;
1277 1277
		}
1278 1278
	} while(ev.type != ButtonRelease);
1382 1382
1383 1383
	if(!(c = selmon->sel))
1384 1384
		return;
1385 +
	if(c->isfullscreen) /* no support resizing fullscreen windows by mouse */
1386 +
		return;
1385 1387
	restack(selmon);
1386 1388
	ocx = c->x;
1387 1389
	ocy = c->y;
1407 1409
				&& (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
1408 1410
					togglefloating(NULL);
1409 1411
			}
1410 -
			if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) {
1411 -
				if(c->isfullscreen)
1412 -
					setfullscreen(c, False);
1412 +
			if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
1413 1413
				resize(c, c->x, c->y, nw, nh, True);
1414 -
			}
1415 1414
			break;
1416 1415
		}
1417 1416
	} while(ev.type != ButtonRelease);
1759 1758
togglefloating(const Arg *arg) {
1760 1759
	if(!selmon->sel)
1761 1760
		return;
1761 +
	if(selmon->sel->isfullscreen) /* no support for fullscreen windows */
1762 +
		return;
1762 1763
	selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
1763 1764
	if(selmon->sel->isfloating)
1764 1765
		resize(selmon->sel, selmon->sel->x, selmon->sel->y,
1765 1766
		       selmon->sel->w, selmon->sel->h, False);
1766 -
	else if(selmon->sel->isfullscreen)
1767 -
		setfullscreen(selmon->sel, False);
1768 1767
	arrange(selmon);
1769 1768
}
1770 1769