gint config_desktops_num;
GSList *config_desktops_names;
+gint config_screen_firstdesk;
gboolean config_redraw_resize;
node = node->children;
if ((n = parse_find_node("number", node))) {
- guint d = parse_int(doc, n);
+ gint d = parse_int(doc, n);
if (d > 0)
config_desktops_num = d;
}
+ if ((n = parse_find_node("firstdesk", node))) {
+ gint d = parse_int(doc, n);
+ if (d > 0)
+ config_screen_firstdesk = d;
+ }
if ((n = parse_find_node("names", node))) {
GSList *it;
xmlNodePtr nname;
parse_register(i, "theme", parse_theme, NULL);
config_desktops_num = 4;
+ config_screen_firstdesk = 1;
config_desktops_names = NULL;
parse_register(i, "desktops", parse_desktops, NULL);
/*! The number of desktops */
extern gint config_desktops_num;
+/*! Desktop to start on, put 5 to start in the center of a 3x3 grid */
+extern gint config_screen_firstdesk;
/*! Names for the desktops */
extern GSList *config_desktops_names;
screen_num_desktops = 0;
screen_set_num_desktops(config_desktops_num);
if (!reconfig) {
- screen_set_desktop(0);
+ screen_set_desktop(MIN(config_screen_firstdesk, screen_num_desktops) - 1);
/* don't start in showing-desktop mode */
screen_showing_desktop = FALSE;