don't steal focus from a window if it was used very recently, when someone uses _NET_...
authorDana Jansens <danakj@orodu.net>
Wed, 29 Sep 2010 19:45:37 +0000 (15:45 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 24 Jan 2011 19:19:22 +0000 (14:19 -0500)
openbox/client.c

index ccc64c6..8eeb052 100644 (file)
@@ -730,9 +730,10 @@ static gboolean client_can_steal_focus(ObClient *self,
         /* If the user is working in another window right now, then don't
            steal focus */
         if (!parent_focused &&
         /* If the user is working in another window right now, then don't
            steal focus */
         if (!parent_focused &&
-            event_last_user_time && launch_time &&
-            event_time_after(event_last_user_time, launch_time) &&
-            event_last_user_time != launch_time &&
+            event_last_user_time &&
+            (!launch_time ||
+             (event_time_after(event_last_user_time, launch_time) &&
+              event_last_user_time != launch_time)) &&
             event_time_after(event_last_user_time,
                              steal_time - OB_EVENT_USER_TIME_DELAY))
         {
             event_time_after(event_last_user_time,
                              steal_time - OB_EVENT_USER_TIME_DELAY))
         {