wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

focusin.c (631B)


      1 /* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "event.h"
      5 
      6 void
      7 event_focusin(XFocusChangeEvent *ev) {
      8 	Window *w;
      9 
     10 	/* Yes, we're focusing in on nothing, here. */
     11 	if(ev->detail == NotifyDetailNone) {
     12 		/* FIXME: Do something. */
     13 		return;
     14 	}
     15 
     16 	if(!((ev->detail == NotifyNonlinear)
     17 	   ||(ev->detail == NotifyNonlinearVirtual)
     18 	   ||(ev->detail == NotifyVirtual)
     19 	   ||(ev->detail == NotifyInferior)
     20 	   ||(ev->detail == NotifyAncestor)))
     21 		return;
     22 	if((ev->mode == NotifyWhileGrabbed))
     23 		return;
     24 
     25 	if((w = findwin(ev->window)))
     26 		event_handle(w, focusin, ev);
     27 }