From 1a6e1a58a769850f9ea5dfaff4eca00dc3ee2a4e Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 16 Feb 2012 02:06:32 +0100 Subject: [PATCH] Take larger to retile after free mode --- src/ewmh.c | 1 - src/layout.c | 12 +++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ewmh.c b/src/ewmh.c index e0deda8..8bb32cc 100644 --- a/src/ewmh.c +++ b/src/ewmh.c @@ -237,7 +237,6 @@ ewmh_manage_window_type(struct client *c) unsigned char *data = NULL; long ldata[5] = { _NET_WM_STATE_ADD }; - if(XGetWindowProperty(W->dpy, c->win, W->net_atom[net_wm_window_type], 0L, 0x7FFFFFFFL, False, XA_ATOM, &rf, &f, &n, &il, &data) == Success && n) { diff --git a/src/layout.c b/src/layout.c index 6e299c1..309ad18 100644 --- a/src/layout.c +++ b/src/layout.c @@ -371,7 +371,7 @@ layout_split_arrange_closed(struct client *ghost) * * So from there, sc is not compatible, so we will integrate * c in the larger tiled client of c tag: - * - Check if the larger client is correct and not equal to c + * - Check if the larger client is correct * * Checks all failed? Get first tiled client of the tag to integrate in. * Still no client, it means that c is the first tiled client of the tag, then maximize it. @@ -380,15 +380,17 @@ void layout_split_integrate(struct client *c, struct client *sc) { struct geo g; - struct client *larger = client_get_larger(c->tag); bool f = false; - /* No sc or not compatible sc to integrate in */ + /* No sc or not compatible, get the largest of the tag */ if(!sc || sc == c || sc->tag != c->tag - || (sc->flags & CLIENT_FREE) - || (!(sc = larger) || sc == c)) + || (sc->flags & CLIENT_FREE)) + sc = client_get_larger(c->tag); + + /* Largest not correct */ + if(!sc || sc == c) { FOREACH_NFCLIENT(sc, &c->tag->clients, tnext) if(sc != c && !(sc->flags & CLIENT_TABBED))