fix crash when reconfigure changes the stacking layer of the dock

This commit is contained in:
Dana Jansens 2003-09-08 03:08:32 +00:00
parent 46e0be4ed7
commit 7eddc48043

View file

@ -21,6 +21,7 @@ void dock_startup(gboolean reconfig)
XSetWindowAttributes attrib; XSetWindowAttributes attrib;
if (reconfig) { if (reconfig) {
stacking_add(DOCK_AS_WINDOW(dock));
dock_configure(); dock_configure();
return; return;
} }
@ -48,12 +49,14 @@ void dock_startup(gboolean reconfig)
g_hash_table_insert(window_map, &dock->frame, dock); g_hash_table_insert(window_map, &dock->frame, dock);
stacking_add(DOCK_AS_WINDOW(dock)); stacking_add(DOCK_AS_WINDOW(dock));
stacking_raise(DOCK_AS_WINDOW(dock));
} }
void dock_shutdown(gboolean reconfig) void dock_shutdown(gboolean reconfig)
{ {
if (reconfig) return; if (reconfig) {
stacking_remove(DOCK_AS_WINDOW(dock));
return;
}
XDestroyWindow(ob_display, dock->frame); XDestroyWindow(ob_display, dock->frame);
RrAppearanceFree(dock->a_frame); RrAppearanceFree(dock->a_frame);