dwm-meillo

diff event.c @ 229:f4f5d000ce7a

implemented NET_ACTIVE_WINDOW support
author Anselm R.Garbe <arg@10ksloc.org>
date Tue, 08 Aug 2006 17:08:45 +0200
parents 7b63c375d28c
children b92bbc2487c9
line diff
     1.1 --- a/event.c	Tue Aug 08 12:58:05 2006 +0200
     1.2 +++ b/event.c	Tue Aug 08 17:08:45 2006 +0200
     1.3 @@ -146,6 +146,18 @@
     1.4  }
     1.5  
     1.6  static void
     1.7 +clientmessage(XEvent *e)
     1.8 +{
     1.9 +	Client *c;
    1.10 +	XClientMessageEvent *ev = &e->xclient;
    1.11 +
    1.12 +	if(ev->message_type == netatom[NetActiveWindow]) {
    1.13 +		if((c = getclient(ev->window)) && c->tags[tsel])
    1.14 +			focus(c);
    1.15 +	}
    1.16 +}
    1.17 +
    1.18 +static void
    1.19  configurerequest(XEvent *e)
    1.20  {
    1.21  	Client *c;
    1.22 @@ -339,6 +351,7 @@
    1.23  
    1.24  void (*handler[LASTEvent]) (XEvent *) = {
    1.25  	[ButtonPress] = buttonpress,
    1.26 +	[ClientMessage] = clientmessage,
    1.27  	[ConfigureRequest] = configurerequest,
    1.28  	[DestroyNotify] = destroynotify,
    1.29  	[EnterNotify] = enternotify,