From 5553ea232b276ac454c048f3f9d9548536a69f05 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 30 Dec 2013 02:20:53 +0100 Subject: don't raise windows with the CWM_NORAISE property set --- xutil.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'xutil.c') diff --git a/xutil.c b/xutil.c index bc37558..d3253ad 100644 --- a/xutil.c +++ b/xutil.c @@ -414,6 +414,21 @@ xu_ewmh_set_net_wm_state(struct client_ctx *cc) free(atoms); } +int +xu_cwm_allow_raise(struct client_ctx *cc) +{ + long noraise = 0; + long *noraisep; + + if (xu_getprop(cc->win, cwmh[CWM_NORAISE], + XA_CARDINAL, 1, (unsigned char **)&noraisep) > 0) { + noraise = *noraisep; + XFree(noraisep); + } + + return noraise == 0; +} + void xu_xorcolor(XftColor a, XftColor b, XftColor *r) { -- cgit 1.4.1