summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorokan <okan>2017-12-29 12:54:54 +0000
committerokan <okan>2017-12-29 12:54:54 +0000
commit5ddaed415c895e56e7c1e6e7b881df8d3c4214bd (patch)
treed401df5768af9f7fc318281aa59561a530e97f98 /client.c
parent156681f0a5af18704faab52929badc671390ec61 (diff)
downloadcwm-5ddaed415c895e56e7c1e6e7b881df8d3c4214bd.tar.gz
cwm-5ddaed415c895e56e7c1e6e7b881df8d3c4214bd.tar.xz
cwm-5ddaed415c895e56e7c1e6e7b881df8d3c4214bd.zip
add helper function client_show to bring together like actions for unhide/raise
Diffstat (limited to 'client.c')
-rw-r--r--client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/client.c b/client.c
index 5ce61e4..3a1ce01 100644
--- a/client.c
+++ b/client.c
@@ -532,6 +532,15 @@ client_hide(struct client_ctx *cc)
 }
 
 void
+client_show(struct client_ctx *cc)
+{
+	if (cc->flags & CLIENT_HIDDEN)
+		client_unhide(cc);
+	else
+		client_raise(cc);
+}
+
+void
 client_unhide(struct client_ctx *cc)
 {
 	XMapRaised(X_Dpy, cc->win);