]> Dogcows Code - chaz/openbox/commitdiff
add a RECONFIGURING state, and enter that when doing reconfiguring
authorDana Jansens <danakj@orodu.net>
Sun, 2 Mar 2008 20:37:07 +0000 (15:37 -0500)
committerDana Jansens <danakj@orodu.net>
Sun, 2 Mar 2008 20:40:11 +0000 (15:40 -0500)
openbox/event.c
openbox/misc.h
openbox/openbox.c
openbox/openbox.h
openbox/screen.c

index 5c4700ae8e226a0882290e442d94d7234c77392c..a7f65fcb1e15ed192825a4e11dab4de1aca9f5b3 100644 (file)
@@ -652,9 +652,11 @@ static void event_process(const XEvent *ec, gpointer data)
         /* keyboard layout changes for modifier mapping changes. reload the
            modifier map, and rebind all the key bindings as appropriate */
         ob_debug("Kepboard map changed. Reloading keyboard bindings.\n");
+        ob_set_state(OB_STATE_RECONFIGURING);
         modkeys_shutdown(TRUE);
         modkeys_startup(TRUE);
         keyboard_rebind();
+        ob_set_state(OB_STATE_RUNNING);
     }
     else if (e->type == ClientMessage) {
         /* This is for _NET_WM_REQUEST_FRAME_EXTENTS messages. They come for
index c73c92658be2c974060f56eb7595525563cfc719..c1ec4075f1c76a00577edf555425dc673a1add37 100644 (file)
@@ -60,7 +60,8 @@ typedef enum
 {
     OB_STATE_STARTING,
     OB_STATE_RUNNING,
-    OB_STATE_EXITING
+    OB_STATE_EXITING,
+    OB_STATE_RECONFIGURING
 } ObState;
 
 typedef enum
index fb1e75d0161a117d6426851b4fb3cfba1b6f5763..eb7934e0541ba5f8494680b44d43c245a46a8dcb 100644 (file)
@@ -121,7 +121,7 @@ gint main(gint argc, gchar **argv)
 {
     gchar *program_name;
 
-    state = OB_STATE_STARTING;
+    ob_set_state(OB_STATE_STARTING);
 
     /* initialize the locale */
     if (!setlocale(LC_ALL, ""))
@@ -367,9 +367,10 @@ gint main(gint argc, gchar **argv)
 
             reconfigure = FALSE;
 
-            state = OB_STATE_RUNNING;
+            ob_set_state(OB_STATE_RUNNING);
             ob_main_loop_run(ob_main_loop);
-            state = OB_STATE_EXITING;
+            ob_set_state(reconfigure ?
+                         OB_STATE_RECONFIGURING : OB_STATE_EXITING);
 
             if (!reconfigure) {
                 dock_remove_all();
@@ -709,3 +710,8 @@ ObState ob_state()
 {
     return state;
 }
+
+void ob_set_state(ObState s)
+{
+    state = s;
+}
index 4f2310f8eaa530dd9c584c91398fb94160fc8bcf..06d38297270bc208215b362d91f79af7cfa328ff 100644 (file)
@@ -52,6 +52,7 @@ extern gboolean ob_debug_xinerama;
 
 /* The state of execution of the window manager */
 ObState ob_state();
+void ob_set_state(ObState state);
 
 void ob_restart_other(const gchar *path);
 void ob_restart();
index 2e48f85c5b3f740e28c9d50dd05c8bb045be1e75..15b3c8d80ccaa69d3e5a4b1707a7680fee49f448 100644 (file)
@@ -492,7 +492,7 @@ void screen_resize(void)
     PROP_SETA32(RootWindow(ob_display, ob_screen),
                 net_desktop_geometry, cardinal, geometry, 2);
 
-    if (ob_state() == OB_STATE_STARTING)
+    if (ob_state() != OB_STATE_RUNNING)
         return;
 
     screen_update_areas();
This page took 0.029318 seconds and 4 git commands to generate.