startup_save();
if (screen_annex()) { /* it will be ours! */
+ ObParseInst *i;
+
/* startup the parsing so everything can register sections of the rc */
- parse_startup();
+ i = parse_startup();
/* anything that is going to read data from the rc file needs to be
in this group */
window_startup();
plugin_startup();
/* load the plugins specified in the pluginrc */
- plugin_loadall();
+ plugin_loadall(i);
/* set up the kernel config shit */
- config_startup();
- menu_startup();
+ config_startup(i);
+ menu_startup(i);
/* parse/load user options */
if (parse_load_rc(&doc, &node))
- parse_tree(doc, node->xmlChildrenNode, NULL);
+ parse_tree(i, doc, node->xmlChildrenNode);
/* we're done with parsing now, kill it */
- parse_shutdown();
+ xmlFreeDoc(doc);
+ parse_shutdown(i);
+
+ menu_parse();
/* load the theme specified in the rc file */
ob_rr_theme = RrThemeNew(ob_rr_inst, config_theme);
client_unmanage_all();
plugin_shutdown(); /* calls all the plugins' shutdown functions */
+ menu_shutdown();
mouse_shutdown();
keyboard_shutdown();
dock_shutdown();
screen_shutdown();
focus_shutdown();
moveresize_shutdown();
- menu_shutdown();
window_shutdown();
grab_shutdown();
event_shutdown();
session_shutdown();
g_free(ob_sm_id);
+#ifdef USE_LIBSN
+ sn_display_unref(ob_sn_display);
+#endif
+
XCloseDisplay(ob_display);
if (restart) {