- if (e->xfocus.mode == NotifyGrab) return;
- /*|| e.xfocus.mode == NotifyUngrab ||*/
- /* From Metacity, from WindowMaker, ignore all funky pointer
- root events. Its commented out cuz I don't think we need this
- at all. If problems arise we can look into it */
- /*e.xfocus.detail > NotifyNonlinearVirtual) */
-
- /* FocusOut events just make us look for FocusIn events. They
- are mostly ignored otherwise. */
+ g_message("FocusOut on %lx mode %d detail %d", window,
+ e->xfocus.mode, e->xfocus.detail);
+ if (e->xfocus.mode == NotifyGrab ||
+ e->xfocus.detail == NotifyInferior ||
+ e->xfocus.detail == NotifyAncestor ||
+ e->xfocus.detail > NotifyNonlinearVirtual) return;
+
+ g_message("FocusOut on %lx", window);
+ /* Try process a FocusIn first, and if a legit one isn't found, then
+ do the fallback shiznit. */