X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fdock.c;h=1df377b0a07b46b662d29902c7857035af04bfcb;hb=506fa94dc74c34ee90af19353184029a76d206e4;hp=df176d66d4ebfff401a337301519994072e8a76e;hpb=de4f92ccc66c1dad1a2820a07d1f0161bd61a855;p=chaz%2Fopenbox diff --git a/openbox/dock.c b/openbox/dock.c index df176d66..1df377b0 100644 --- a/openbox/dock.c +++ b/openbox/dock.c @@ -16,10 +16,15 @@ static ObDock *dock; StrutPartial dock_strut; -void dock_startup() +void dock_startup(gboolean reconfig) { XSetWindowAttributes attrib; + if (reconfig) { + dock_configure(); + return; + } + STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -46,8 +51,10 @@ void dock_startup() stacking_raise(DOCK_AS_WINDOW(dock)); } -void dock_shutdown() +void dock_shutdown(gboolean reconfig) { + if (reconfig) return; + XDestroyWindow(ob_display, dock->frame); RrAppearanceFree(dock->a_frame); g_hash_table_remove(window_map, &dock->frame); @@ -344,11 +351,14 @@ void dock_configure() strh = ob_rr_theme->bwidth; } else { strw = dock->w; - strh = dock->h; + strh = dock->h; } /* set the strut */ - if (config_dock_floating) { + if (!dock->dock_apps) { + STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0); + } else if (config_dock_floating) { STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { @@ -439,7 +449,10 @@ void dock_configure() dock->w -= ob_rr_theme->bwidth * 2; dock->h -= ob_rr_theme->bwidth * 2; - if (dock->w > 0 && dock->h > 0) { + if (dock->dock_apps) { + g_assert(dock->w > 0); + g_assert(dock->h > 0); + XMoveResizeWindow(ob_display, dock->frame, dock->x, dock->y, dock->w, dock->h);