summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2015-08-23 17:31:21 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2015-08-23 17:31:21 +0000
commitd051cf879e22018d38275a9c262d402752da208e (patch)
treed3a11a490a12f2f6bf8bdaee8a29203ab08fc2ca
parentfd1e956879d79bc41b8644c86da46b5ac7279674 (diff)
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.
-rw-r--r--app/cwm/client.c8
-rw-r--r--app/cwm/group.c14
2 files changed, 10 insertions, 12 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index fd6d75c41..91c9d2cd9 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.202 2015/08/21 16:52:37 okan Exp $
+ * $OpenBSD: client.c,v 1.203 2015/08/23 17:31:20 okan Exp $
*/
#include <sys/types.h>
@@ -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/app/cwm/group.c b/app/cwm/group.c
index dbaf98273..3532c8a67 100644
--- a/app/cwm/group.c
+++ b/app/cwm/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.113 2015/08/21 15:52:49 okan Exp $
+ * $OpenBSD: group.c,v 1.114 2015/08/23 17:31:20 okan Exp $
*/
#include <sys/types.h>
@@ -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);