X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fopenbox.c;h=1c4a8706cd1069ccb26978ee78115ddcf3935c06;hb=191a0bc07568aca3b85e4b4789b7dc4d3733742f;hp=e3309f005b2b022dfd9c81162b769de37a8a84c1;hpb=17b2d57717504e2018d3ba23e0deffe55fc6d084;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index e3309f00..1c4a8706 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -87,6 +87,7 @@ static Cursor cursors[OB_NUM_CURSORS]; static KeyCode keys[OB_NUM_KEYS]; static gint exitcode = 0; static gboolean reconfigure_and_exit = FALSE; +static gboolean being_replaced = FALSE; static void signal_handler(gint signal, gpointer data); static void parse_args(gint argc, gchar **argv); @@ -332,7 +333,7 @@ gint main(gint argc, gchar **argv) RrThemeFree(ob_rr_theme); RrInstanceFree(ob_rr_inst); - session_shutdown(); + session_shutdown(being_replaced); XCloseDisplay(ob_display); @@ -448,7 +449,7 @@ static void parse_args(gint argc, gchar **argv) void ob_exit_with_error(gchar *msg) { g_critical(msg); - session_shutdown(); + session_shutdown(TRUE); exit(EXIT_FAILURE); } @@ -476,6 +477,13 @@ void ob_exit(gint code) ob_main_loop_exit(ob_main_loop); } +void ob_exit_replace() +{ + exitcode = 0; + being_replaced = TRUE; + ob_main_loop_exit(ob_main_loop); +} + Cursor ob_cursor(ObCursor cursor) { g_assert(cursor < OB_NUM_CURSORS);