X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=1c4a8706cd1069ccb26978ee78115ddcf3935c06;hb=191a0bc07568aca3b85e4b4789b7dc4d3733742f;hp=91d968e905b1255c68ed1bb09d2091e38d04d73e;hpb=831deb72c6adda56e737a5951483888795e97919;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index 91d968e9..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; } @@ -287,6 +293,9 @@ gint main(gint argc, gchar **argv) /* redecorate all existing windows */ for (it = client_list; it; it = g_list_next(it)) { ObClient *c = it->data; + /* the new config can change the window's decorations */ + client_setup_decor_and_functions(c); + /* redraw the frames */ frame_adjust_area(c->frame, TRUE, TRUE, FALSE); } } @@ -324,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); @@ -440,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); } @@ -468,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);