Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        focus.c 


Log Message:
Focus tweaks.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- focus.c     2 Jun 2005 22:11:08 -0000       1.102
+++ focus.c     17 Jun 2005 23:34:13 -0000      1.103
@@ -249,7 +249,7 @@
 static void
 doFocusToEwin(EWin * ewin, int why)
 {
-   int                 do_follow = 0;
+   int                 do_focus = 0;
    int                 do_raise = 0, do_warp = 0;
 
    if (focus_inhibit)
@@ -306,32 +306,36 @@
      case FOCUS_EWIN_NEW:
        if (Conf.focus.all_new_windows_get_focus)
          {
-            do_follow = 2;
+            do_focus = 1;
          }
-       else if (Conf.focus.new_transients_get_focus)
+       else if (Mode.place.doing_manual)
          {
-            if (ewin->client.transient)
-               do_follow = 2;
+            do_focus = 1;
          }
-       else if (Conf.focus.new_transients_get_focus_if_group_focused)
-         {
-            EWin               *ewin2;
 
-            ewin2 = FindItem(NULL, ewin->client.transient_for,
-                             LIST_FINDBY_ID, LIST_TYPE_EWIN);
-            if ((ewin2) && (Mode.focuswin == ewin2))
-               do_follow = 2;
-         }
-       else if (Mode.place.doing_manual)
+       if (ewin->client.transient)
          {
-            do_follow = 1;
+            if (Conf.focus.new_transients_get_focus)
+              {
+                 do_focus = 2;
+              }
+            else if (Conf.focus.new_transients_get_focus_if_group_focused)
+              {
+                 EWin               *ewin2;
+
+                 ewin2 = FindItem(NULL, ewin->client.transient_for,
+                                  LIST_FINDBY_ID, LIST_TYPE_EWIN);
+                 if ((ewin2) && (Mode.focuswin == ewin2))
+                    do_focus = 2;
+              }
+
+            if (do_focus == 2)
+               DeskGotoByEwin(ewin);
          }
 
-       if (!do_follow)
-          return;
-       if (ewin == Mode.focuswin)
+       if (!do_focus)
           return;
-       if (!FocusEwinValid(ewin, 0, 0, 0))
+       if (!FocusEwinValid(ewin, 1, 0, 0))
           return;
        break;
      }
@@ -349,9 +353,6 @@
    if (why != FOCUS_CLICK && ewin->focusclick)
       return;
 
-   if (do_follow)
-      DeskGotoByEwin(ewin);
-
    if (Conf.autoraise.enable)
      {
        RemoveTimerEvent("AUTORAISE_TIMEOUT");
@@ -496,7 +497,10 @@
    ewin = GetEwinByCurrentPointer();
    Mode.mouse_over_ewin = ewin;
 
+   focus_pending_why = 0;
+   focus_pending_ewin = focus_pending_new = NULL;
    FocusToEWin(NULL, FOCUS_DESK_ENTER);
+   FocusSet();
 
    /* Enable window placement features */
    Mode.place.enable_features = 1;




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to