summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-29 18:05:02 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-29 18:05:02 +0200
commit70a3e62257d05946176aad3dbe19047d3bb705c1 (patch)
tree2018d3eb3b41a5ab00796866c7fdc84f35b5c990 /event.c
parent6828fba7a002062dd383f83bb8d584a82fc7677a (diff)
now dwm enforces max screen size also in tiled mode on non-floating clients which are maximized
Diffstat (limited to 'event.c')
-rw-r--r--event.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/event.c b/event.c
index a1d2d9ce..5a1c68e1 100644
--- a/event.c
+++ b/event.c
@@ -150,7 +150,6 @@ buttonpress(XEvent *e)
static void
configurerequest(XEvent *e)
{
- int ox, oy, ow, oh;
unsigned long newmask;
Client *c;
XConfigureRequestEvent *ev = &e->xconfigurerequest;
@@ -158,10 +157,20 @@ configurerequest(XEvent *e)
XWindowChanges wc;
if((c = getclient(ev->window))) {
- ox = c->x;
- oy = c->y;
- ow = c->w;
- oh = c->h;
+ if(!c->isfloat && (arrange != dofloat) && c->ismax) {
+ synev.type = ConfigureNotify;
+ synev.xconfigure.display = dpy;
+ 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);
if(ev->value_mask & CWX)
c->x = ev->x;
@@ -192,19 +201,11 @@ configurerequest(XEvent *e)
synev.xconfigure.height = c->h;
synev.xconfigure.border_width = c->border;
synev.xconfigure.above = None;
- /* Send synthetic ConfigureNotify */
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
}
XSync(dpy, False);
if(c->isfloat)
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
arrange(NULL);
}