now dwm enforces max screen size also in tiled mode on non-floating clients which are maximized
This commit is contained in:
parent
6828fba7a0
commit
70a3e62257
1 changed files with 14 additions and 13 deletions
27
event.c
27
event.c
|
@ -150,7 +150,6 @@ buttonpress(XEvent *e)
|
||||||
static void
|
static void
|
||||||
configurerequest(XEvent *e)
|
configurerequest(XEvent *e)
|
||||||
{
|
{
|
||||||
int ox, oy, ow, oh;
|
|
||||||
unsigned long newmask;
|
unsigned long newmask;
|
||||||
Client *c;
|
Client *c;
|
||||||
XConfigureRequestEvent *ev = &e->xconfigurerequest;
|
XConfigureRequestEvent *ev = &e->xconfigurerequest;
|
||||||
|
@ -158,10 +157,20 @@ configurerequest(XEvent *e)
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
|
|
||||||
if((c = getclient(ev->window))) {
|
if((c = getclient(ev->window))) {
|
||||||
ox = c->x;
|
if(!c->isfloat && (arrange != dofloat) && c->ismax) {
|
||||||
oy = c->y;
|
synev.type = ConfigureNotify;
|
||||||
ow = c->w;
|
synev.xconfigure.display = dpy;
|
||||||
oh = c->h;
|
synev.xconfigure.event = c->win;
|
||||||
|
synev.xconfigure.window = c->win;
|
||||||
|
synev.xconfigure.x = sx;
|
||||||
|
synev.xconfigure.y = sy + bh;
|
||||||
|
synev.xconfigure.width = sw - 2;
|
||||||
|
synev.xconfigure.height = sw - 2 - bh;
|
||||||
|
synev.xconfigure.border_width = ev->border_width;
|
||||||
|
synev.xconfigure.above = None;
|
||||||
|
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
|
||||||
|
return;
|
||||||
|
}
|
||||||
gravitate(c, True);
|
gravitate(c, True);
|
||||||
if(ev->value_mask & CWX)
|
if(ev->value_mask & CWX)
|
||||||
c->x = ev->x;
|
c->x = ev->x;
|
||||||
|
@ -192,19 +201,11 @@ configurerequest(XEvent *e)
|
||||||
synev.xconfigure.height = c->h;
|
synev.xconfigure.height = c->h;
|
||||||
synev.xconfigure.border_width = c->border;
|
synev.xconfigure.border_width = c->border;
|
||||||
synev.xconfigure.above = None;
|
synev.xconfigure.above = None;
|
||||||
/* Send synthetic ConfigureNotify */
|
|
||||||
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
|
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
|
||||||
}
|
}
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
if(c->isfloat)
|
if(c->isfloat)
|
||||||
resize(c, False, TopLeft);
|
resize(c, False, TopLeft);
|
||||||
else if(c->ismax) {
|
|
||||||
resize(c, False, TopLeft);
|
|
||||||
c->x = ox;
|
|
||||||
c->y = oy;
|
|
||||||
c->w = ow;
|
|
||||||
c->h = oh;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
arrange(NULL);
|
arrange(NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue