Mercurial > dwm-meillo
changeset 384:126e78129f1d
configurenotify remembers max geom now, and restores this if necessary, however it accepts to touch the max size on configurerequest, this shouldn't break fillscreen apps (tested with mplayer)
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Tue, 29 Aug 2006 17:31:55 +0200 (2006-08-29) |
parents | 2ec9cead84a7 |
children | 37706ba7d492 |
files | event.c tag.c |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/event.c Tue Aug 29 17:11:37 2006 +0200 +++ b/event.c Tue Aug 29 17:31:55 2006 +0200 @@ -150,6 +150,7 @@ static void configurerequest(XEvent *e) { + int ox, oy, ow, oh; unsigned long newmask; Client *c; XConfigureRequestEvent *ev = &e->xconfigurerequest; @@ -157,6 +158,10 @@ XWindowChanges wc; if((c = getclient(ev->window))) { + ox = c->x; + oy = c->y; + ow = c->w; + oh = c->h; gravitate(c, True); if(ev->value_mask & CWX) c->x = ev->x; @@ -191,8 +196,13 @@ XSendEvent(dpy, c->win, True, NoEventMask, &synev); } XSync(dpy, False); - if(c->isfloat) + if(c->isfloat || c->ismax) { resize(c, False, TopLeft); + c->x = ox; + c->y = oy; + c->w = ow; + c->h = oh; + } else arrange(NULL); }
--- a/tag.c Tue Aug 29 17:11:37 2006 +0200 +++ b/tag.c Tue Aug 29 17:31:55 2006 +0200 @@ -31,7 +31,7 @@ static unsigned int len = 0; static void -applytag() +commit() { /* asserts sel != NULL */ settitle(sel); @@ -132,7 +132,7 @@ for(i = 0; i < ntags; i++) sel->tags[i] = False; sel->tags[arg->i] = True; - applytag(); + commit(); } void @@ -147,5 +147,5 @@ for(i = 0; i < ntags && !sel->tags[i]; i++); if(i == ntags) sel->tags[arg->i] = True; - applytag(); + commit(); }