summaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-08 17:08:45 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-08 17:08:45 +0200
commit92e55c7c53cb808b584982ac8f6d69112d713fab (patch)
tree6e8ad48b16b5baad43c0e5460deafc2d7dc6b741 /event.c
parentfixed typo (diff)
downloaddwm-92e55c7c53cb808b584982ac8f6d69112d713fab.tar.gz
dwm-92e55c7c53cb808b584982ac8f6d69112d713fab.zip
implemented NET_ACTIVE_WINDOW support
Diffstat (limited to '')
-rw-r--r--event.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/event.c b/event.c
index 2e4f62e..c3169aa 100644
--- a/event.c
+++ b/event.c
@@ -146,6 +146,18 @@ buttonpress(XEvent *e)
146} 146}
147 147
148static void 148static void
149clientmessage(XEvent *e)
150{
151 Client *c;
152 XClientMessageEvent *ev = &e->xclient;
153
154 if(ev->message_type == netatom[NetActiveWindow]) {
155 if((c = getclient(ev->window)) && c->tags[tsel])
156 focus(c);
157 }
158}
159
160static void
149configurerequest(XEvent *e) 161configurerequest(XEvent *e)
150{ 162{
151 Client *c; 163 Client *c;
@@ -339,6 +351,7 @@ unmapnotify(XEvent *e)
339 351
340void (*handler[LASTEvent]) (XEvent *) = { 352void (*handler[LASTEvent]) (XEvent *) = {
341 [ButtonPress] = buttonpress, 353 [ButtonPress] = buttonpress,
354 [ClientMessage] = clientmessage,
342 [ConfigureRequest] = configurerequest, 355 [ConfigureRequest] = configurerequest,
343 [DestroyNotify] = destroynotify, 356 [DestroyNotify] = destroynotify,
344 [EnterNotify] = enternotify, 357 [EnterNotify] = enternotify,