Browse Source

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)

config
Anselm R. Garbe 18 years ago
parent
commit
aa1bda8164
2 changed files with 14 additions and 4 deletions
  1. +11
    -1
      event.c
  2. +3
    -3
      tag.c

+ 11
- 1
event.c View File

@ -150,6 +150,7 @@ 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;
@ -157,6 +158,10 @@ configurerequest(XEvent *e)
XWindowChanges wc; XWindowChanges wc;
if((c = getclient(ev->window))) { if((c = getclient(ev->window))) {
ox = c->x;
oy = c->y;
ow = c->w;
oh = c->h;
gravitate(c, True); gravitate(c, True);
if(ev->value_mask & CWX) if(ev->value_mask & CWX)
c->x = ev->x; c->x = ev->x;
@ -191,8 +196,13 @@ configurerequest(XEvent *e)
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 || c->ismax) {
resize(c, False, TopLeft); resize(c, False, TopLeft);
c->x = ox;
c->y = oy;
c->w = ow;
c->h = oh;
}
else else
arrange(NULL); arrange(NULL);
} }


+ 3
- 3
tag.c View File

@ -31,7 +31,7 @@ static RReg *rreg = NULL;
static unsigned int len = 0; static unsigned int len = 0;
static void static void
applytag()
commit()
{ {
/* asserts sel != NULL */ /* asserts sel != NULL */
settitle(sel); settitle(sel);
@ -132,7 +132,7 @@ tag(Arg *arg)
for(i = 0; i < ntags; i++) for(i = 0; i < ntags; i++)
sel->tags[i] = False; sel->tags[i] = False;
sel->tags[arg->i] = True; sel->tags[arg->i] = True;
applytag();
commit();
} }
void void
@ -147,5 +147,5 @@ toggletag(Arg *arg)
for(i = 0; i < ntags && !sel->tags[i]; i++); for(i = 0; i < ntags && !sel->tags[i]; i++);
if(i == ntags) if(i == ntags)
sel->tags[arg->i] = True; sel->tags[arg->i] = True;
applytag();
commit();
} }

Loading…
Cancel
Save