]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
add a reconfigure action, also reconfigure on SIGUSR2.
[chaz/openbox] / openbox / focus.c
index 6e738d4a0642c3b5529816c0019e1f1226831ff3..36be7456659e74719596657a1545886dd1f1258c 100644 (file)
@@ -24,28 +24,30 @@ GList **focus_order; /* these lists are created when screen_startup
 static ObClient *focus_cycle_target;
 static Popup *focus_cycle_popup;
 
-void focus_startup()
+void focus_startup(gboolean reconfig)
 {
-
     focus_cycle_popup = popup_new(TRUE);
 
-    /* start with nothing focused */
-    focus_set_client(NULL);
+    if (!reconfig)
+        /* start with nothing focused */
+        focus_set_client(NULL);
 }
 
-void focus_shutdown()
+void focus_shutdown(gboolean reconfig)
 {
     guint i;
 
-    for (i = 0; i < screen_num_desktops; ++i)
-        g_list_free(focus_order[i]);
-    g_free(focus_order);
-
     popup_free(focus_cycle_popup);
 
-    /* reset focus to root */
-    XSetInputFocus(ob_display, PointerRoot, RevertToPointerRoot,
-                   event_lasttime);
+    if (!reconfig) {
+        for (i = 0; i < screen_num_desktops; ++i)
+            g_list_free(focus_order[i]);
+        g_free(focus_order);
+
+        /* reset focus to root */
+        XSetInputFocus(ob_display, PointerRoot, RevertToPointerRoot,
+                       event_lasttime);
+    }
 }
 
 static void push_to_top(ObClient *client)
This page took 0.026551 seconds and 4 git commands to generate.