diff --git a/WINGs/WINGs/WINGs.h b/WINGs/WINGs/WINGs.h index d9aba8c4..5682dfaa 100644 --- a/WINGs/WINGs/WINGs.h +++ b/WINGs/WINGs/WINGs.h @@ -1833,6 +1833,7 @@ WMFont* WMGetFontPanelFont(WMFontPanel *panel); /* ---[ WINGs/configuration.c ]------------------------------------------- */ unsigned W_getconf_mouseWheelUp(void); unsigned W_getconf_mouseWheelDown(void); +void W_setconf_doubleClickDelay(int value); #ifdef __cplusplus } diff --git a/WINGs/configuration.c b/WINGs/configuration.c index 2f56aa89..8e53ba6e 100644 --- a/WINGs/configuration.c +++ b/WINGs/configuration.c @@ -125,3 +125,8 @@ unsigned W_getconf_mouseWheelDown(void) { return WINGsConfiguration.mouseWheelDown; } + +void W_setconf_doubleClickDelay(int value) +{ + WINGsConfiguration.doubleClickDelay = value; +} diff --git a/src/defaults.c b/src/defaults.c index 13c5d692..f04e9be5 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -2985,22 +2985,12 @@ static int setModifierKeyLabels(WScreen * scr, WDefaultEntry * entry, WMPropList return 0; } -/* - * Very ugly kluge. - * Need access to the double click variables, so that all widgets in - * wmaker panels will have the same dbl-click values. - * TODO: figure a better way of dealing with it. - */ -#include - -static int setDoubleClick(WScreen * scr, WDefaultEntry * entry, int *value, void *foo) +static int setDoubleClick(WScreen *scr, WDefaultEntry *entry, int *value, void *foo) { - extern _WINGsConfiguration WINGsConfiguration; - if (*value <= 0) *(int *)foo = 1; - WINGsConfiguration.doubleClickDelay = *value; + W_setconf_doubleClickDelay(*value); return 0; }