X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=42a062bef5a85d2e12b7649361c20af921144bd2;hb=319fb35962ed80298af17476c8cacfe4ce7470b5;hp=f66f6a762e4d748f2add4314619775dbd368cbec;hpb=559ab9c9226b5c79c31baf584b15e53a22fc8d00;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index f66f6a76..42a062be 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -92,6 +92,7 @@ gboolean ob_replace_wm = FALSE; gboolean ob_sm_use = TRUE; gchar *ob_sm_id = NULL; gchar *ob_sm_save_file = NULL; +gboolean ob_sm_restore = TRUE; gboolean ob_debug_xinerama = FALSE; static ObState state; @@ -176,7 +177,7 @@ gint main(gint argc, gchar **argv) ob_rr_inst = RrInstanceNew(ob_display, ob_screen); if (ob_rr_inst == NULL) - ob_exit_with_error(_("Failed to initialize the render library.")); + ob_exit_with_error(_("Failed to initialize the obrender library.")); XSynchronize(ob_display, xsync); @@ -272,6 +273,9 @@ gint main(gint argc, gchar **argv) } if (ob_rr_theme == NULL) ob_exit_with_error(_("Unable to load a theme.")); + + PROP_SETS(RootWindow(ob_display, ob_screen), + ob_theme, theme->name); } if (reconfigure) { @@ -327,7 +331,7 @@ gint main(gint argc, gchar **argv) 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); + client_setup_decor_and_functions(c, TRUE); /* redraw the frames */ frame_adjust_area(c->frame, TRUE, TRUE, FALSE); } @@ -396,12 +400,13 @@ gint main(gint argc, gchar **argv) } } - /* we remove the session arguments from argv, so put them back */ + /* we remove the session arguments from argv, so put them back, + also don't restore the session on restart */ if (ob_sm_save_file != NULL || ob_sm_id != NULL) { gchar **nargv; gint i, l; - l = argc + + l = argc + 1 + (ob_sm_save_file != NULL ? 2 : 0) + (ob_sm_id != NULL ? 2 : 0); nargv = g_new0(gchar*, l+1); @@ -416,6 +421,7 @@ gint main(gint argc, gchar **argv) nargv[i++] = g_strdup("--sm-client-id"); nargv[i++] = ob_sm_id; } + nargv[i++] = g_strdup("--sm-no-load"); g_assert(i == l); argv = nargv; } @@ -572,6 +578,11 @@ static void parse_args(gint *argc, gchar **argv) else if (!strcmp(argv[i], "--sm-disable")) { ob_sm_use = FALSE; } + else if (!strcmp(argv[i], "--sm-no-load")) { + ob_sm_restore = FALSE; + remove_args(argc, argv, i, 1); + --i; /* this arg was removed so go back */ + } else { /* this is a memleak.. oh well.. heh */ gchar *err = g_strdup_printf