]> Dogcows Code - chaz/openbox/blobdiff - openbox/openbox.c
i moved the font shadow stuff back into the theme, so move them out of the font confi...
[chaz/openbox] / openbox / openbox.c
index 91d968e905b1255c68ed1bb09d2091e38d04d73e..1c4a8706cd1069ccb26978ee78115ddcf3935c06 100644 (file)
@@ -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);
This page took 0.022057 seconds and 4 git commands to generate.