]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
define DEBUG, NDEBUG, and G_DISABLE_ASSERTS
[chaz/openbox] / openbox / focus.c
index 3376d50ac352f6689383feb93794b8b38c2b46d8..c95111fbe93a00e471b3265400a0f56f6747d9be 100644 (file)
@@ -75,8 +75,7 @@ void focus_shutdown(gboolean reconfig)
         g_free(focus_order);
 
         /* reset focus to root */
-        XSetInputFocus(ob_display, PointerRoot, RevertToPointerRoot,
-                       event_lasttime);
+        XSetInputFocus(ob_display, PointerRoot, RevertToNone, event_lasttime);
     }
 }
 
@@ -104,8 +103,11 @@ void focus_set_client(ObClient *client)
     screen_install_colormap(client, TRUE);
 
     if (client == NULL) {
-       /* when nothing will be focused, send focus to the backup target */
-       XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
+#ifdef DEBUG_FOCUS
+        ob_debug("actively focusing NONWINDOW\n");
+#endif
+        /* when nothing will be focused, send focus to the backup target */
+        XSetInputFocus(ob_display, screen_support_win, RevertToNone,
                        event_lasttime);
         XSync(ob_display, FALSE);
     }
@@ -183,7 +185,7 @@ void focus_fallback(ObFocusFallbackType type)
         if (old->transient_for) {
             gboolean trans = FALSE;
 
-            if (config_focus_last || !config_focus_follow)
+            if (!config_focus_follow)
                 trans = TRUE;
             else {
                 ObClient *c;
@@ -194,8 +196,6 @@ void focus_fallback(ObFocusFallbackType type)
                     trans = TRUE;
             }
 
-            g_message("trans %d", trans);
-
             /* try for transient relations */
             if (trans) {
                 if (old->transient_for == OB_TRAN_GROUP) {
@@ -215,7 +215,7 @@ void focus_fallback(ObFocusFallbackType type)
         }
     }
 
-    if (!config_focus_last && config_focus_follow)
+    if (config_focus_follow)
         if (focus_under_pointer())
             return;
 
This page took 0.020765 seconds and 4 git commands to generate.