X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fdock.c;h=06d50354ff56271b1a28cf789c12ac9afdc93a8a;hb=c234ed9ecd9d5228744aae018768ff0c04f2d217;hp=592446a2ff22e193966dfb23bb3eecca0ff018e7;hpb=174de91c343dfbdfe866e566393bf4790ae22596;p=chaz%2Fopenbox diff --git a/openbox/dock.c b/openbox/dock.c index 592446a2..06d50354 100644 --- a/openbox/dock.c +++ b/openbox/dock.c @@ -60,7 +60,7 @@ void dock_startup(gboolean reconfig) XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->bwidth); RrAppearanceFree(dock->a_frame); - dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_unfocused_title); + dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_focused_title); stacking_add(DOCK_AS_WINDOW(dock)); @@ -88,7 +88,7 @@ void dock_startup(gboolean reconfig) RrVisual(ob_rr_inst), CWOverrideRedirect | CWEventMask, &attrib); - dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_unfocused_title); + dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_focused_title); XSetWindowBorder(ob_display, dock->frame, RrColorPixel(ob_rr_theme->b_color)); XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->bwidth); @@ -129,7 +129,7 @@ void dock_add(Window win, XWMHints *wmhints) if (PROP_GETSS(app->win, wm_class, locale, &data)) { if (data[0]) { - app->name = g_strdup(data[0]); + app->name = g_strdup(data[0]); if (data[1]) app->class = g_strdup(data[1]); } @@ -158,7 +158,7 @@ void dock_add(Window win, XWMHints *wmhints) handled and need to be ignored. */ if (ob_state() == OB_STATE_STARTING) - app->ignore_unmaps += 2; + app->ignore_unmaps += 2; if (app->win != app->icon_win) { /* have to map it so that it can be re-managed on a restart */ @@ -197,7 +197,7 @@ void dock_remove(ObDockApp *app, gboolean reparent) g_hash_table_remove(window_map, &app->icon_win); if (reparent) - XReparentWindow(ob_display, app->icon_win, + XReparentWindow(ob_display, app->icon_win, RootWindow(ob_display, ob_screen), app->x, app->y); dock->dock_apps = g_list_remove(dock->dock_apps, app); @@ -410,7 +410,7 @@ void dock_configure() 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) { + } else if (config_dock_floating || config_dock_nostrut) { STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { @@ -597,17 +597,30 @@ static gboolean hide_timeout(gpointer data) return FALSE; /* don't repeat */ } +static gboolean show_timeout(gpointer data) +{ + /* hide */ + dock->hidden = FALSE; + dock_configure(); + + return FALSE; /* don't repeat */ +} + void dock_hide(gboolean hide) { if (!hide) { - /* show */ - dock->hidden = FALSE; - dock_configure(); - - /* if was hiding, stop it */ - ob_main_loop_timeout_remove(ob_main_loop, hide_timeout); - } else if (!dock->hidden && config_dock_hide) { - ob_main_loop_timeout_add(ob_main_loop, config_dock_hide_delay, + if (dock->hidden && config_dock_hide) { + ob_main_loop_timeout_add(ob_main_loop, config_dock_show_delay, + show_timeout, NULL, NULL); + } else if (!dock->hidden && config_dock_hide) { + ob_main_loop_timeout_remove(ob_main_loop, hide_timeout); + } + } else { + if (!dock->hidden && config_dock_hide) { + ob_main_loop_timeout_add(ob_main_loop, config_dock_hide_delay, hide_timeout, NULL, NULL); + } else if (dock->hidden && config_dock_hide) { + ob_main_loop_timeout_remove(ob_main_loop, show_timeout); + } } }