]> Dogcows Code - chaz/openbox/blobdiff - openbox/dock.c
update copyright step 2
[chaz/openbox] / openbox / dock.c
index b127d40b376e4dfc6a3ba2078ad72bd6b8fc0140..7b92ff5892f2cb12734727b35c0bcb72d930f066 100644 (file)
@@ -1,6 +1,7 @@
 /* -*- 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
@@ -60,7 +61,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 +89,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);
@@ -410,7 +411,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 +598,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);
+        }
     }
 }
This page took 0.027503 seconds and 4 git commands to generate.