/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
dock.c for the Openbox window manager
+ Copyright (c) 2006 Mikael Magnusson
Copyright (c) 2003 Ben Jansens
This program is free software; you can redistribute it and/or modify
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));
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);
dock->y = a->height;
gravity = SouthEastGravity;
break;
+ default:
+ g_assert_not_reached();
}
}
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 {
case OB_ORIENTATION_VERT:
after = (y > over->h / 2);
break;
+ default:
+ g_assert_not_reached();
}
/* remove before doing the it->next! */
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);
+ }
}
}