fix a crash after reconfigure, the desktop names were not being re-set. so now they aren't deleted since we don't want to change them over a reconfigure anyways.
This commit is contained in:
parent
73348c28de
commit
37e2be2a57
2 changed files with 57 additions and 55 deletions
|
@ -92,11 +92,11 @@
|
||||||
</theme>
|
</theme>
|
||||||
|
|
||||||
<desktops>
|
<desktops>
|
||||||
|
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||||
|
during a session -->
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
<firstdesk>1</firstdesk>
|
<firstdesk>1</firstdesk>
|
||||||
<names>
|
<names>
|
||||||
<!-- the desktop names are only set at startup, pagers allow you to
|
|
||||||
change them during a session -->
|
|
||||||
<name>desktop one</name>
|
<name>desktop one</name>
|
||||||
<name>desktop two</name>
|
<name>desktop two</name>
|
||||||
<name>desktop three</name>
|
<name>desktop three</name>
|
||||||
|
|
|
@ -299,10 +299,16 @@ gboolean screen_annex(const gchar *program_name)
|
||||||
|
|
||||||
void screen_startup(gboolean reconfig)
|
void screen_startup(gboolean reconfig)
|
||||||
{
|
{
|
||||||
if (!reconfig) {
|
|
||||||
guint i, numnames;
|
guint i, numnames;
|
||||||
gchar **names;
|
gchar **names;
|
||||||
GSList *it;
|
GSList *it;
|
||||||
|
guint32 d;
|
||||||
|
|
||||||
|
desktop_cycle_popup = pager_popup_new(FALSE);
|
||||||
|
pager_popup_height(desktop_cycle_popup, POPUP_HEIGHT);
|
||||||
|
|
||||||
|
if (reconfig)
|
||||||
|
return;
|
||||||
|
|
||||||
/* get the initial size */
|
/* get the initial size */
|
||||||
screen_resize();
|
screen_resize();
|
||||||
|
@ -318,16 +324,11 @@ void screen_startup(gboolean reconfig)
|
||||||
PROP_SETSS(RootWindow(ob_display, ob_screen), net_desktop_names,names);
|
PROP_SETSS(RootWindow(ob_display, ob_screen), net_desktop_names,names);
|
||||||
|
|
||||||
g_strfreev(names);
|
g_strfreev(names);
|
||||||
}
|
|
||||||
|
|
||||||
desktop_cycle_popup = pager_popup_new(FALSE);
|
/* set the number of desktops */
|
||||||
pager_popup_height(desktop_cycle_popup, POPUP_HEIGHT);
|
|
||||||
|
|
||||||
if (!reconfig)
|
|
||||||
screen_num_desktops = 0;
|
screen_num_desktops = 0;
|
||||||
screen_set_num_desktops(config_desktops_num);
|
screen_set_num_desktops(config_desktops_num);
|
||||||
if (!reconfig) {
|
|
||||||
guint32 d;
|
|
||||||
/* start on the current desktop when a wm was already running */
|
/* start on the current desktop when a wm was already running */
|
||||||
if (PROP_GET32(RootWindow(ob_display, ob_screen),
|
if (PROP_GET32(RootWindow(ob_display, ob_screen),
|
||||||
net_current_desktop, cardinal, &d) &&
|
net_current_desktop, cardinal, &d) &&
|
||||||
|
@ -347,7 +348,6 @@ void screen_startup(gboolean reconfig)
|
||||||
net_showing_desktop, cardinal, screen_showing_desktop);
|
net_showing_desktop, cardinal, screen_showing_desktop);
|
||||||
|
|
||||||
screen_update_layout();
|
screen_update_layout();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void screen_shutdown(gboolean reconfig)
|
void screen_shutdown(gboolean reconfig)
|
||||||
|
@ -356,7 +356,9 @@ void screen_shutdown(gboolean reconfig)
|
||||||
|
|
||||||
pager_popup_free(desktop_cycle_popup);
|
pager_popup_free(desktop_cycle_popup);
|
||||||
|
|
||||||
if (!reconfig) {
|
if (reconfig)
|
||||||
|
return;
|
||||||
|
|
||||||
XSelectInput(ob_display, RootWindow(ob_display, ob_screen),
|
XSelectInput(ob_display, RootWindow(ob_display, ob_screen),
|
||||||
NoEventMask);
|
NoEventMask);
|
||||||
|
|
||||||
|
@ -368,10 +370,10 @@ void screen_shutdown(gboolean reconfig)
|
||||||
PROP_ERASE(RootWindow(ob_display, ob_screen), net_showing_desktop);
|
PROP_ERASE(RootWindow(ob_display, ob_screen), net_showing_desktop);
|
||||||
|
|
||||||
XDestroyWindow(ob_display, screen_support_win);
|
XDestroyWindow(ob_display, screen_support_win);
|
||||||
}
|
|
||||||
|
|
||||||
g_strfreev(screen_desktop_names);
|
g_strfreev(screen_desktop_names);
|
||||||
screen_desktop_names = NULL;
|
screen_desktop_names = NULL;
|
||||||
|
|
||||||
for (r = area; *r; ++r)
|
for (r = area; *r; ++r)
|
||||||
g_free(*r);
|
g_free(*r);
|
||||||
g_free(area);
|
g_free(area);
|
||||||
|
|
Loading…
Reference in a new issue