From 92e55c7c53cb808b584982ac8f6d69112d713fab Mon Sep 17 00:00:00 2001 From: "Anselm R.Garbe" Date: Tue, 8 Aug 2006 17:08:45 +0200 Subject: implemented NET_ACTIVE_WINDOW support --- event.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'event.c') diff --git a/event.c b/event.c index 2e4f62ee..c3169aa7 100644 --- a/event.c +++ b/event.c @@ -145,6 +145,18 @@ buttonpress(XEvent *e) } } +static void +clientmessage(XEvent *e) +{ + Client *c; + XClientMessageEvent *ev = &e->xclient; + + if(ev->message_type == netatom[NetActiveWindow]) { + if((c = getclient(ev->window)) && c->tags[tsel]) + focus(c); + } +} + static void configurerequest(XEvent *e) { @@ -339,6 +351,7 @@ unmapnotify(XEvent *e) void (*handler[LASTEvent]) (XEvent *) = { [ButtonPress] = buttonpress, + [ClientMessage] = clientmessage, [ConfigureRequest] = configurerequest, [DestroyNotify] = destroynotify, [EnterNotify] = enternotify, -- cgit v1.2.3