applied Andreas Amann fullscreen fix, some minor modifications

This commit is contained in:
anselm@garbe.us 2012-03-17 18:14:17 +01:00
parent 54c3044dec
commit 1b62f8fa58

13
dwm.c
View File

@ -1261,8 +1261,11 @@ movemouse(const Arg *arg) {
&& (abs(nx - c->x) > snap || abs(ny - c->y) > snap)) && (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
togglefloating(NULL); togglefloating(NULL);
} }
if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) {
if(c->isfullscreen)
setfullscreen(c, False);
resize(c, nx, ny, c->w, c->h, True); resize(c, nx, ny, c->w, c->h, True);
}
break; break;
} }
} while(ev.type != ButtonRelease); } while(ev.type != ButtonRelease);
@ -1397,8 +1400,11 @@ resizemouse(const Arg *arg) {
&& (abs(nw - c->w) > snap || abs(nh - c->h) > snap)) && (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
togglefloating(NULL); togglefloating(NULL);
} }
if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) {
if(c->isfullscreen)
setfullscreen(c, False);
resize(c, c->x, c->y, nw, nh, True); resize(c, c->x, c->y, nw, nh, True);
}
break; break;
} }
} while(ev.type != ButtonRelease); } while(ev.type != ButtonRelease);
@ -1744,6 +1750,8 @@ togglefloating(const Arg *arg) {
if(selmon->sel->isfloating) if(selmon->sel->isfloating)
resize(selmon->sel, selmon->sel->x, selmon->sel->y, resize(selmon->sel, selmon->sel->x, selmon->sel->y,
selmon->sel->w, selmon->sel->h, False); selmon->sel->w, selmon->sel->h, False);
else if(selmon->sel->isfullscreen)
setfullscreen(selmon->sel, False);
arrange(selmon); arrange(selmon);
} }
@ -2020,7 +2028,6 @@ updatewindowtype(Client *c) {
if(state == netatom[NetWMFullscreen]) if(state == netatom[NetWMFullscreen])
setfullscreen(c, True); setfullscreen(c, True);
if(wtype == netatom[NetWMWindowTypeDialog]) if(wtype == netatom[NetWMWindowTypeDialog])
c->isfloating = True; c->isfloating = True;
} }