Author: olivier
Date: 2007-01-08 21:02:43 +0000 (Mon, 08 Jan 2007)
New Revision: 24323

Modified:
   xfwm4/trunk/src/events.c
Log:
Ignore focus stealing prevention between windows of the same group or between 
windows that have a transient relationship.

Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c    2007-01-08 20:53:52 UTC (rev 24322)
+++ xfwm4/trunk/src/events.c    2007-01-08 21:02:43 UTC (rev 24323)
@@ -1705,8 +1705,15 @@
                Some apps tend to focus the window directly. If focus stealing 
prevention is enabled, 
                we revert the user set focus to the window that we think has 
focus and then set the 
                demand attention flag.
+
+               Note that focus stealing prevention is ignored between windows 
of the same group or
+               between windows that have a transient relationship, as some 
apps tend to play with
+               focus with their "own" windows.
              */
-            if (screen_info->params->prevent_focus_stealing)
+
+            if (screen_info->params->prevent_focus_stealing &&
+                !clientSameGroup (c, user_focus) &&
+                !clientIsTransientOrModalFor (c, user_focus))
             {
                 TRACE ("Setting focus back to \"%s\" (0x%lx)", 
user_focus->name, user_focus->window); 
                 clientSetFocus (user_focus->screen_info, user_focus, 
getXServerTime (display_info), NO_FOCUS_FLAG);

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to