Fix resize at removing fullscreen state with free clients

This commit is contained in:
Martin Duquesnoy 2012-02-15 19:47:54 +01:00
parent 7dd2bcaec9
commit 8ba39d3960
3 changed files with 32 additions and 4 deletions

View File

@ -186,5 +186,25 @@ clients_tag_arrange_map(struct tag *t)
sfunc(c); sfunc(c);
} }
static inline struct client*
client_get_larger(struct tag *t)
{
struct client *c, *lc = NULL;
int tmp, l = 0;
FOREACH_NFCLIENT(c, &t->clients, tnext)
{
if((tmp = (c->geo.w + c->geo.h)) > l)
{
l = tmp;
lc = c;
}
}
if(lc && (lc->flags & CLIENT_TABBED))
lc = lc->tabmaster;
return lc;
}
#endif /* CLIENT_H */ #endif /* CLIENT_H */

View File

@ -220,7 +220,10 @@ ewmh_manage_state(long data[], struct client *c)
(unsigned char*)0, 0); (unsigned char*)0, 0);
XReparentWindow(W->dpy, c->win, c->frame, c->wgeo.x, c->wgeo.y); XReparentWindow(W->dpy, c->win, c->frame, c->wgeo.x, c->wgeo.y);
layout_fix_hole(c); if(c->flags & CLIENT_FREE)
client_moveresize(c, &c->geo);
else
layout_fix_hole(c);
} }
} }
} }

View File

@ -370,10 +370,15 @@ layout_split_integrate(struct client *c, struct client *sc)
struct geo g; struct geo g;
bool f = false; bool f = false;
/* No sc or not compatible sc */ /* No sc or not compatible sc to integrate in */
if(!sc || sc == c || sc->tag != c->tag if(!sc
|| sc->flags & CLIENT_FREE) || sc == c
|| sc->tag != c->tag
|| (sc->flags & CLIENT_FREE))
{ {
/* Larger tiled one?
if(!(sc = client_get_larger(c->tag)) || sc == c)*/
/* /*
* check for the first tiled client or * check for the first tiled client or
* maximize the lonely client * maximize the lonely client