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 |
parents | 2ec9cead84a7 |
children | 37706ba7d492 |
files | event.c tag.c |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/event.c Tue Aug 29 17:11:37 2006 +0200 1.2 +++ b/event.c Tue Aug 29 17:31:55 2006 +0200 1.3 @@ -150,6 +150,7 @@ 1.4 static void 1.5 configurerequest(XEvent *e) 1.6 { 1.7 + int ox, oy, ow, oh; 1.8 unsigned long newmask; 1.9 Client *c; 1.10 XConfigureRequestEvent *ev = &e->xconfigurerequest; 1.11 @@ -157,6 +158,10 @@ 1.12 XWindowChanges wc; 1.13 1.14 if((c = getclient(ev->window))) { 1.15 + ox = c->x; 1.16 + oy = c->y; 1.17 + ow = c->w; 1.18 + oh = c->h; 1.19 gravitate(c, True); 1.20 if(ev->value_mask & CWX) 1.21 c->x = ev->x; 1.22 @@ -191,8 +196,13 @@ 1.23 XSendEvent(dpy, c->win, True, NoEventMask, &synev); 1.24 } 1.25 XSync(dpy, False); 1.26 - if(c->isfloat) 1.27 + if(c->isfloat || c->ismax) { 1.28 resize(c, False, TopLeft); 1.29 + c->x = ox; 1.30 + c->y = oy; 1.31 + c->w = ow; 1.32 + c->h = oh; 1.33 + } 1.34 else 1.35 arrange(NULL); 1.36 }
2.1 --- a/tag.c Tue Aug 29 17:11:37 2006 +0200 2.2 +++ b/tag.c Tue Aug 29 17:31:55 2006 +0200 2.3 @@ -31,7 +31,7 @@ 2.4 static unsigned int len = 0; 2.5 2.6 static void 2.7 -applytag() 2.8 +commit() 2.9 { 2.10 /* asserts sel != NULL */ 2.11 settitle(sel); 2.12 @@ -132,7 +132,7 @@ 2.13 for(i = 0; i < ntags; i++) 2.14 sel->tags[i] = False; 2.15 sel->tags[arg->i] = True; 2.16 - applytag(); 2.17 + commit(); 2.18 } 2.19 2.20 void 2.21 @@ -147,5 +147,5 @@ 2.22 for(i = 0; i < ntags && !sel->tags[i]; i++); 2.23 if(i == ntags) 2.24 sel->tags[arg->i] = True; 2.25 - applytag(); 2.26 + commit(); 2.27 }