2010-05-22 06:52:47 +04:00
|
|
|
/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
|
|
|
|
* See LICENSE file for license details.
|
|
|
|
*/
|
|
|
|
#include "event.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
event_focusin(XFocusChangeEvent *ev) {
|
|
|
|
Window *w;
|
|
|
|
|
|
|
|
/* Yes, we're focusing in on nothing, here. */
|
|
|
|
if(ev->detail == NotifyDetailNone) {
|
|
|
|
/* FIXME: Do something. */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!((ev->detail == NotifyNonlinear)
|
|
|
|
||(ev->detail == NotifyNonlinearVirtual)
|
|
|
|
||(ev->detail == NotifyVirtual)
|
|
|
|
||(ev->detail == NotifyInferior)
|
|
|
|
||(ev->detail == NotifyAncestor)))
|
|
|
|
return;
|
|
|
|
if((ev->mode == NotifyWhileGrabbed))
|
|
|
|
return;
|
|
|
|
|
2010-06-14 18:30:23 +04:00
|
|
|
if((w = findwin(ev->window)))
|
2010-05-27 11:58:02 +04:00
|
|
|
event_handle(w, focusin, ev);
|
2010-05-22 06:52:47 +04:00
|
|
|
}
|