X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=1c4a8706cd1069ccb26978ee78115ddcf3935c06;hb=191a0bc07568aca3b85e4b4789b7dc4d3733742f;hp=087efd6be943f672b7e7141925670d46ef7523f0;hpb=aa852556c0bc12e41a24da01df031d1eb886f9fa;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index 087efd6b..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); @@ -244,7 +245,12 @@ gint main(gint argc, gchar **argv) /* load the theme specified in the rc file */ { RrTheme *theme; - if ((theme = RrThemeNew(ob_rr_inst, config_theme))) { + if ((theme = RrThemeNew(ob_rr_inst, config_theme, + config_font_activewindow, + config_font_inactivewindow, + config_font_menutitle, + config_font_menuitem))) + { RrThemeFree(ob_rr_theme); ob_rr_theme = theme; } @@ -327,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); @@ -443,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); } @@ -471,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);