X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=377b21990317acf1884414d8e6e85c52269645bb;hb=bb557f06a6828a95ee94c7579919dec1ee014484;hp=fb1e75d0161a117d6426851b4fb3cfba1b6f5763;hpb=ab089515eff792ba893d2e2fdd29e9b76f15b26e;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index fb1e75d0..377b2199 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -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, "")) @@ -323,7 +323,6 @@ gint main(gint argc, gchar **argv) grab_startup(reconfigure); group_startup(reconfigure); ping_startup(reconfigure); - prompt_startup(reconfigure); client_startup(reconfigure); dock_startup(reconfigure); moveresize_startup(reconfigure); @@ -331,6 +330,7 @@ gint main(gint argc, gchar **argv) mouse_startup(reconfigure); menu_frame_startup(reconfigure); menu_startup(reconfigure); + prompt_startup(reconfigure); if (!reconfigure) { guint32 xid; @@ -367,15 +367,17 @@ 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(); client_unmanage_all(); } + prompt_shutdown(reconfigure); menu_shutdown(reconfigure); menu_frame_shutdown(reconfigure); mouse_shutdown(reconfigure); @@ -383,7 +385,6 @@ gint main(gint argc, gchar **argv) moveresize_shutdown(reconfigure); dock_shutdown(reconfigure); client_shutdown(reconfigure); - prompt_shutdown(reconfigure); ping_shutdown(reconfigure); group_shutdown(reconfigure); grab_shutdown(reconfigure); @@ -709,3 +710,8 @@ ObState ob_state() { return state; } + +void ob_set_state(ObState s) +{ + state = s; +}