+3.3:
+ * Add a showDelay option for the dock.
+
3.3-rc2:
* Fixed some typos and errors in rc.xsd
* Add the noStrut option to the dock (to allow maximizing windows over it),
Add fourCorners to resize context.
Sat Feb 12 01:57:16 UTC 2005 - mikachu(a)openbox.org
Add the group option to raise/lower stuff.
+ Sun Sep 25 14:44:21 UTC 2005 - mikachu(a)openbox.org
+ Add showDelay for the dock
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://openbox.org/"
<xs:element name="floatingY" type="xs:integer"/>
<xs:element name="autoHide" type="ob:yesorno"/>
<xs:element name="hideDelay" type="xs:integer"/>
+ <xs:element name="showDelay" type="xs:integer"/>
<xs:element name="moveButton" type="ob:button"/>
<xs:element name="noStrut" type="ob:yesorno"/>
</xs:sequence>
ObOrientation config_dock_orient;
gboolean config_dock_hide;
guint config_dock_hide_delay;
+guint config_dock_show_delay;
guint config_dock_app_move_button;
guint config_dock_app_move_modifiers;
config_dock_hide = parse_bool(doc, n);
if ((n = parse_find_node("hideDelay", node)))
config_dock_hide_delay = parse_int(doc, n) * 1000;
+ if ((n = parse_find_node("showDelay", node)))
+ config_dock_show_delay = parse_int(doc, n) * 1000;
if ((n = parse_find_node("moveButton", node))) {
gchar *str = parse_string(doc, n);
guint b, s;
config_dock_orient = OB_ORIENTATION_VERT;
config_dock_hide = FALSE;
config_dock_hide_delay = 300;
+ config_dock_show_delay = 300;
config_dock_app_move_button = 2; /* middle */
config_dock_app_move_modifiers = 0;
extern gboolean config_dock_hide;
/*! The number of microseconds to wait before hiding the dock */
extern guint config_dock_hide_delay;
+/*! The number of microseconds to wait before showing the dock */
+extern guint config_dock_show_delay;
/*! The mouse button to be used to move dock apps */
extern guint config_dock_app_move_button;
/*! The modifiers to be used with the button to move dock apps */
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);
+ }
}
}