aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
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