diff --git a/WindowMaker/Defaults/WindowMaker.in b/WindowMaker/Defaults/WindowMaker.in index 3e576bea..500046e9 100644 --- a/WindowMaker/Defaults/WindowMaker.in +++ b/WindowMaker/Defaults/WindowMaker.in @@ -131,4 +131,8 @@ MenuTitleBack = (solid, black); MenuTextBack = (solid, "rgb:aa/aa/aa"); IconBack = (dgradient, "rgb:a6/a6/b6", "rgb:51/55/61"); + ClipAutocollapseDelay = 1000; + ClipAutolowerDelay = 1000; + ClipAutoexpandDelay = 600; + ClipAutoraiseDelay = 600; } diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 039a67ba..25e1a757 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -419,6 +419,12 @@ typedef struct WPreferences { char cycle_active_head_only; /* Cycle only windows on the active head */ char cycle_ignore_minimized; /* Ignore minimized windows when cycling */ + /* All delays here are in ms. 0 means instant auto-action. */ + int clip_auto_raise_delay; /* Delay after which the clip will be raised when entered */ + int clip_auto_lower_delay; /* Delay after which the clip will be lowered when leaved */ + int clip_auto_expand_delay; /* Delay after which the clip will expand when entered */ + int clip_auto_collapse_delay; /* Delay after which the clip will collapse when leaved */ + RImage *swtileImage; RImage *swbackImage[9]; diff --git a/src/defaults.c b/src/defaults.c index f04e9be5..3119aebc 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -394,6 +394,14 @@ WDefaultEntry optionList[] = { &wPreferences.do_not_make_appicons_bounce, getBool, NULL, NULL, NULL}, {"DoubleClickTime", "250", (void *)&wPreferences.dblclick_time, &wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL}, + {"ClipAutoraiseDelay", "600", NULL, + &wPreferences.clip_auto_raise_delay, getInt, NULL, NULL, NULL}, + {"ClipAutolowerDelay", "1000", NULL, + &wPreferences.clip_auto_lower_delay, getInt, NULL, NULL, NULL}, + {"ClipAutoexpandDelay", "600", NULL, + &wPreferences.clip_auto_expand_delay, getInt, NULL, NULL, NULL}, + {"ClipAutocollapseDelay", "1000", NULL, + &wPreferences.clip_auto_collapse_delay, getInt, NULL, NULL, NULL}, {"AlignSubmenus", "NO", NULL, &wPreferences.align_menus, getBool, NULL, NULL, NULL}, {"ViKeyMenus", "NO", NULL, diff --git a/src/dock.c b/src/dock.c index 443c09e3..9c2f35e8 100644 --- a/src/dock.c +++ b/src/dock.c @@ -3792,7 +3792,7 @@ static void clipEnterNotify(WObjDescriptor *desc, XEvent *event) dock->auto_lower_magic = NULL; } if (dock->auto_raise_lower && !dock->auto_raise_magic) - dock->auto_raise_magic = WMAddTimerHandler(AUTO_RAISE_DELAY, clipAutoRaise, (void *)dock); + dock->auto_raise_magic = WMAddTimerHandler(wPreferences.clip_auto_raise_delay, clipAutoRaise, (void *)dock); /* The auto expand/collapse code */ if (dock->auto_collapse_magic) { @@ -3800,7 +3800,7 @@ static void clipEnterNotify(WObjDescriptor *desc, XEvent *event) dock->auto_collapse_magic = NULL; } if (dock->auto_collapse && !dock->auto_expand_magic) - dock->auto_expand_magic = WMAddTimerHandler(AUTO_EXPAND_DELAY, clipAutoExpand, (void *)dock); + dock->auto_expand_magic = WMAddTimerHandler(wPreferences.clip_auto_expand_delay, clipAutoExpand, (void *)dock); } static void clipLeave(WDock *dock) @@ -3832,14 +3832,14 @@ static void clipLeave(WDock *dock) dock->auto_raise_magic = NULL; } if (dock->auto_raise_lower && !dock->auto_lower_magic) - dock->auto_lower_magic = WMAddTimerHandler(AUTO_LOWER_DELAY, clipAutoLower, (void *)dock); + dock->auto_lower_magic = WMAddTimerHandler(wPreferences.clip_auto_lower_delay, clipAutoLower, (void *)dock); if (dock->auto_expand_magic) { WMDeleteTimerHandler(dock->auto_expand_magic); dock->auto_expand_magic = NULL; } if (dock->auto_collapse && !dock->auto_collapse_magic) - dock->auto_collapse_magic = WMAddTimerHandler(AUTO_COLLAPSE_DELAY, clipAutoCollapse, (void *)dock); + dock->auto_collapse_magic = WMAddTimerHandler(wPreferences.clip_auto_collapse_delay, clipAutoCollapse, (void *)dock); } static void clipLeaveNotify(WObjDescriptor *desc, XEvent *event) diff --git a/src/wconfig.h.in b/src/wconfig.h.in index c21638d3..58b00444 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -301,20 +301,6 @@ * a docked icon must be dragged out to detach it */ #define DOCK_DETTACH_THRESHOLD 3 -/* Delay (in ms) after which the clip will autocollapse when leaved */ -#define AUTO_COLLAPSE_DELAY 1000 - -/* Delay (in ms) after which the clip will autoexpand when entered. - * Set this to zero if you want instant expanding. */ -#define AUTO_EXPAND_DELAY 600 - -/* Delay (in ms) after which the clip will be lowered when leaved */ -#define AUTO_LOWER_DELAY 1000 - -/* Delay (in ms) after which the clip will be raised when entered. - * Set this to zero if you want instant raise. */ -#define AUTO_RAISE_DELAY 600 - /* Max. number of icons the dock and clip can have */ #define DOCK_MAX_ICONS 32