]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/eventh.c
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / ioncore / eventh.c
index 91ab5501dfd2405575798afe79890d31097f8518..5e1e1fe81d9439dafebb3e4b77548b6ec725e68f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ion/ioncore/eventh.c
  *
- * Copyright (c) Tuomo Valkonen 1999-2006
+ * Copyright (c) Tuomo Valkonen 1999-2007
  *
  * Ion is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by
@@ -305,9 +305,6 @@ void ioncore_handle_expose(const XExposeEvent *ev)
 /*{{{ Enter window, focus */
 
 
-/*extern Time ioncore_focus_time;*/
-
-
 static void do_handle_enter_window(XEvent *ev)
 {
     XEnterWindowEvent *eev=&(ev->xcrossing);
@@ -316,15 +313,6 @@ static void do_handle_enter_window(XEvent *ev)
     if(ioncore_g.input_mode!=IONCORE_INPUTMODE_NORMAL)
         return;
     
-    /*if(ioncore_g.focus_next!=NULL && ioncore_focus_time==CurrentTime)
-        return;*/
-        
-    /*if(ioncore_await_warp())
-        return;
-    
-    if(eev->mode!=NotifyNormal && !ioncore_g.warp_enabled)
-        return;*/
-        
     reg=XWINDOW_REGION_OF_T(eev->window, WRegion);
     
     if(reg==NULL)
@@ -335,9 +323,10 @@ static void do_handle_enter_window(XEvent *ev)
         
     if(region_skip_focus(reg))
         return;
-        
+
     /* If a child of 'reg' is to be focused, do not process this
-     * event.
+     * event. (ioncore_g.focus_next should only be set here by
+     * another call to use from ioncore_handle_enter_window below.)
      */
     if(ioncore_g.focus_next!=NULL){
         WRegion *r2=ioncore_g.focus_next;
@@ -397,8 +386,7 @@ void ioncore_handle_focus_in(const XFocusChangeEvent *ev, bool skip)
     if(ev->detail==NotifyPointer)
         return;
     
-    /* Root windows appear either as WRootWins or WScreens */
-    if(ev->window==region_root_of(reg)){
+    if(ev->window==region_root_of(reg)){ /* OBJ_IS(reg, WRootWin) */
         D(fprintf(stderr, "scr-in %d %d %d\n", ROOTWIN_OF(reg)->xscr,
                   ev->mode, ev->detail));
         if((ev->detail==NotifyPointerRoot || ev->detail==NotifyDetailNone) &&
@@ -408,7 +396,6 @@ void ioncore_handle_focus_in(const XFocusChangeEvent *ev, bool skip)
                 region_set_focus(reg);
             return;
         }
-        /*return;*/
     }
 
     /* Input contexts */