From 7c97a8599f2bccf1a709eeb39d9b2d812f619dc9 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sun, 13 Nov 2011 15:22:57 +0100 Subject: [PATCH] Fix esc at resize preview, work on tab.. --- src/client.c | 17 +++++++++-------- src/wmfs.h | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/client.c b/src/client.c index 73ce47d..ce300d8 100644 --- a/src/client.c +++ b/src/client.c @@ -325,16 +325,12 @@ client_tab_etablish(struct client *c) struct chead cs; struct client *cc, *prev = c; - if(c->tabhead != NULL) - while(!SLIST_EMPTY(c->tabhead)) - SLIST_REMOVE_HEAD(c->tabhead, tbnext); - SLIST_INIT(&cs); SLIST_INSERT_HEAD(&cs, c, tbnext); SLIST_FOREACH(cc, &c->tag->clients, tnext) { - if(GEOCMP(c->geo, cc->geo)) + if(c != cc && GEOCMP(c->geo, cc->geo)) { SLIST_INSERT_AFTER(prev, cc, tbnext); prev = cc; @@ -807,7 +803,7 @@ client_moveresize(struct client *c, struct geo *g) c->flags &= ~CLIENT_DID_WINSIZE; if(/* TABBING OPTION */ 1) - { /* client_tab_etablish(c); */ } + client_tab_etablish(c); client_frame_update(c, CCOL(c)); client_update_props(c, CPROP_GEO); @@ -1003,12 +999,17 @@ client_fac_resize(struct client *c, enum position p, int fac) if(b) { client_apply_tgeo(c->tag); - layout_save_set(c->tag); } /* Aborted with escape, Set back original geos */ else - client_apply_tgeo(c->tag); + { + SLIST_FOREACH(gc, &c->tag->clients, tnext) + { + gc->tgeo = gc->geo; + gc->flags &= ~CLIENT_DID_WINSIZE; + } + } XUngrabServer(W->dpy); XUngrabKeyboard(W->dpy, CurrentTime); diff --git a/src/wmfs.h b/src/wmfs.h index 846ac67..0ef1135 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -127,6 +127,8 @@ struct screen SLIST_ENTRY(screen) next; }; +SLIST_HEAD(chead, client); + struct tag { struct screen *screen; @@ -140,7 +142,6 @@ struct tag TAILQ_ENTRY(tag) next; }; -SLIST_HEAD(chead, client); struct client { struct tag *tag;