aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2017-12-29 12:54:54 +0000
committerokan2017-12-29 12:54:54 +0000
commit0aa3e7d08d83b487beb552501005df507b1ac0f8 (patch)
treebfe46fad158f7f959a92daac6f3938f3257b3918 /client.c
parent2adf37a96f7d23964494764d3ebc4e788711acf2 (diff)
downloadcwm-0aa3e7d08d83b487beb552501005df507b1ac0f8.tar.gz
add helper function client_show to bring together like actions for unhide/raise
Diffstat (limited to 'client.c')
-rw-r--r--client.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/client.c b/client.c
index dcc4afc..a9776b0 100644
--- a/client.c
+++ b/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.242 2017/12/22 21:21:44 okan Exp $
+ * $OpenBSD: client.c,v 1.243 2017/12/29 12:54:54 okan Exp $
*/
#include <sys/types.h>
@@ -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);