aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2014-01-02 22:43:55 +0000
committerokan2014-01-02 22:43:55 +0000
commit904cac0e8d808313ed4d593ec837d170ff7eac92 (patch)
tree95b7f00bb6923c591d57701a772e2d5ad5c6c2c7 /xevents.c
parent4b9c8d497017a2ae91416a04ee4557752e07b7fd (diff)
downloadcwm-904cac0e8d808313ed4d593ec837d170ff7eac92.tar.gz
Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, though
instead of group toggle, group only.
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xevents.c b/xevents.c
index 1f5cdc4..f53122b 100644
--- a/xevents.c
+++ b/xevents.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: xevents.c,v 1.102 2014/01/02 22:26:27 okan Exp $
+ * $OpenBSD: xevents.c,v 1.103 2014/01/02 22:43:55 okan Exp $
*/
/*
@@ -326,8 +326,11 @@ xev_handle_clientmessage(XEvent *ee)
{
XClientMessageEvent *e = &ee->xclient;
struct client_ctx *cc, *old_cc;
+ struct screen_ctx *sc;
- if ((cc = client_find(e->window)) == NULL)
+ sc = screen_fromroot(e->window);
+
+ if ((cc = client_find(e->window)) == NULL && e->window != sc->rootwin)
return;
if (e->message_type == cwmh[WM_CHANGE_STATE] && e->format == 32 &&
@@ -349,6 +352,9 @@ xev_handle_clientmessage(XEvent *ee)
if (e->message_type == ewmh[_NET_WM_STATE] && e->format == 32)
xu_ewmh_handle_net_wm_state_msg(cc,
e->data.l[0], e->data.l[1], e->data.l[2]);
+
+ if (e->message_type == ewmh[_NET_CURRENT_DESKTOP] && e->format == 32)
+ group_only(sc, e->data.l[0]);
}
static void