From b224945446083ec061cea8ae41ee98190f7a4185 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 23 Aug 2015 17:31:20 +0000 Subject: [PATCH] Move CLIENT_STICKY logic from client hide/unhide to group hide/unhide; rationale being that clients should be able to hide/unhide independently of group switching. --- client.c | 6 ------ group.c | 12 ++++++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/client.c b/client.c index 7faf0ef..6b3ab11 100644 --- a/client.c +++ b/client.c @@ -493,9 +493,6 @@ client_ptrsave(struct client_ctx *cc) void client_hide(struct client_ctx *cc) { - if (cc->flags & CLIENT_STICKY) - return; - XUnmapWindow(X_Dpy, cc->win); cc->flags &= ~CLIENT_ACTIVE; @@ -509,9 +506,6 @@ client_hide(struct client_ctx *cc) void client_unhide(struct client_ctx *cc) { - if (cc->flags & CLIENT_STICKY) - return; - XMapRaised(X_Dpy, cc->win); cc->flags &= ~CLIENT_HIDDEN; diff --git a/group.c b/group.c index bbcd6cf..c2d4b36 100644 --- a/group.c +++ b/group.c @@ -64,8 +64,10 @@ group_hide(struct group_ctx *gc) screen_updatestackingorder(gc->sc); - TAILQ_FOREACH(cc, &gc->clientq, group_entry) - client_hide(cc); + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { + if (!(cc->flags & CLIENT_STICKY)) + client_hide(cc); + } } void @@ -73,8 +75,10 @@ group_show(struct group_ctx *gc) { struct client_ctx *cc; - TAILQ_FOREACH(cc, &gc->clientq, group_entry) - client_unhide(cc); + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { + if (!(cc->flags & CLIENT_STICKY)) + client_unhide(cc); + } group_restack(gc); group_setactive(gc);