summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/dwm.c b/dwm.c
index 90505b1..685eb4a 100644
--- a/dwm.c
+++ b/dwm.c
@@ -575,8 +575,9 @@ configurenotify(XEvent *e) {
575 XConfigureEvent *ev = &e->xconfigure; 575 XConfigureEvent *ev = &e->xconfigure;
576 Bool dirty; 576 Bool dirty;
577 577
578 // TODO: updategeom handling sucks, needs to be simplified
578 if(ev->window == root) { 579 if(ev->window == root) {
579 dirty = (sw != ev->width); 580 dirty = (sw != ev->width || sh != ev->height);
580 sw = ev->width; 581 sw = ev->width;
581 sh = ev->height; 582 sh = ev->height;
582 if(updategeom() || dirty) { 583 if(updategeom() || dirty) {
@@ -1235,6 +1236,8 @@ movemouse(const Arg *arg) {
1235 1236
1236 if(!(c = selmon->sel)) 1237 if(!(c = selmon->sel))
1237 return; 1238 return;
1239 if(c->isfullscreen) /* no support moving fullscreen windows by mouse */
1240 return;
1238 restack(selmon); 1241 restack(selmon);
1239 ocx = c->x; 1242 ocx = c->x;
1240 ocy = c->y; 1243 ocy = c->y;
@@ -1268,11 +1271,8 @@ movemouse(const Arg *arg) {
1268 && (abs(nx - c->x) > snap || abs(ny - c->y) > snap)) 1271 && (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
1269 togglefloating(NULL); 1272 togglefloating(NULL);
1270 } 1273 }
1271 if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) { 1274 if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
1272 if(c->isfullscreen)
1273 setfullscreen(c, False);
1274 resize(c, nx, ny, c->w, c->h, True); 1275 resize(c, nx, ny, c->w, c->h, True);
1275 }
1276 break; 1276 break;
1277 } 1277 }
1278 } while(ev.type != ButtonRelease); 1278 } while(ev.type != ButtonRelease);
@@ -1382,6 +1382,8 @@ resizemouse(const Arg *arg) {
1382 1382
1383 if(!(c = selmon->sel)) 1383 if(!(c = selmon->sel))
1384 return; 1384 return;
1385 if(c->isfullscreen) /* no support resizing fullscreen windows by mouse */
1386 return;
1385 restack(selmon); 1387 restack(selmon);
1386 ocx = c->x; 1388 ocx = c->x;
1387 ocy = c->y; 1389 ocy = c->y;
@@ -1407,11 +1409,8 @@ resizemouse(const Arg *arg) {
1407 && (abs(nw - c->w) > snap || abs(nh - c->h) > snap)) 1409 && (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
1408 togglefloating(NULL); 1410 togglefloating(NULL);
1409 } 1411 }
1410 if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) { 1412 if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
1411 if(c->isfullscreen)
1412 setfullscreen(c, False);
1413 resize(c, c->x, c->y, nw, nh, True); 1413 resize(c, c->x, c->y, nw, nh, True);
1414 }
1415 break; 1414 break;
1416 } 1415 }
1417 } while(ev.type != ButtonRelease); 1416 } while(ev.type != ButtonRelease);
@@ -1759,12 +1758,12 @@ void
1759togglefloating(const Arg *arg) { 1758togglefloating(const Arg *arg) {
1760 if(!selmon->sel) 1759 if(!selmon->sel)
1761 return; 1760 return;
1761 if(selmon->sel->isfullscreen) /* no support for fullscreen windows */
1762 return;
1762 selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; 1763 selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
1763 if(selmon->sel->isfloating) 1764 if(selmon->sel->isfloating)
1764 resize(selmon->sel, selmon->sel->x, selmon->sel->y, 1765 resize(selmon->sel, selmon->sel->x, selmon->sel->y,
1765 selmon->sel->w, selmon->sel->h, False); 1766 selmon->sel->w, selmon->sel->h, False);
1766 else if(selmon->sel->isfullscreen)
1767 setfullscreen(selmon->sel, False);
1768 arrange(selmon); 1767 arrange(selmon);
1769} 1768}
1770 1769