[Xfce4-commits] r26434 - xfwm4/trunk/src

Olivier Fourdan olivier at xfce.org
Mon Dec 3 22:43:32 CET 2007


Author: olivier
Date: 2007-12-03 21:43:32 +0000 (Mon, 03 Dec 2007)
New Revision: 26434

Modified:
   xfwm4/trunk/src/focus.c
Log:
Rework focus transition since now parents get raised along with the transients - That makes things more predictible.

Modified: xfwm4/trunk/src/focus.c
===================================================================
--- xfwm4/trunk/src/focus.c	2007-12-03 21:41:38 UTC (rev 26433)
+++ xfwm4/trunk/src/focus.c	2007-12-03 21:43:32 UTC (rev 26434)
@@ -305,7 +305,7 @@
     new_focus = NULL;
     current_focus = client_focus;
     c2 = NULL;
-#if 0
+#if 1
     if (pending_focus)
     {
         current_focus = pending_focus;
@@ -323,14 +323,15 @@
 
     display_info = screen_info->display_info;
     top_most = clientGetTopMostFocusable (screen_info, look_in_layer, exclude);
+#if 0
     if (screen_info->params->click_to_focus)
     {
         if (c)
         {
-            if (clientIsTransientOrModal (c))
+            if (clientIsModal (c))
             {
-                /* If the window is a transient or modal, send focus back to
-                 * its parent window.
+                /* If the window is a modal, send focus back to its parent
+                 * window.
                  * Modals are transients, and we aren't interested in modal
                  * for group, so it safe to use clientGetTransient because
                  * it's really what we want...
@@ -353,7 +354,10 @@
             }
         }
     }
-    else if (XQueryPointer (myScreenGetXDisplay (screen_info), screen_info->xroot, &dr, &window, &rx, &ry, &wx, &wy, &mask))
+    else
+#endif
+    if (!(screen_info->params->click_to_focus) &&
+        XQueryPointer (myScreenGetXDisplay (screen_info), screen_info->xroot, &dr, &window, &rx, &ry, &wx, &wy, &mask))
     {
         new_focus = clientAtPosition (screen_info, rx, ry, exclude);
     }



More information about the Xfce4-commits mailing list