diff --git a/src/defaults.c b/src/defaults.c index 00c05d2c..469809f1 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -154,6 +154,7 @@ static WDECallbackUpdate setModifierKeyLabels; static WDECallbackConvert getCursor; static WDECallbackUpdate setCursor; +static WDECallbackUpdate updateDock ; /* * Tables to convert strings to enumeration values. @@ -522,7 +523,8 @@ WDefaultEntry optionList[] = { {"IgnoreGtkHints", "NO", NULL, &wPreferences.ignore_gtk_decoration_hints, getBool, NULL, NULL, NULL}, {"KeepDockOnPrimaryHead", "NO", NULL, - &wPreferences.keep_dock_on_primary_head, getBool, NULL, NULL, NULL}, + &wPreferences.keep_dock_on_primary_head, getBool, updateDock, + NULL, NULL}, /* style options */ @@ -3485,3 +3487,15 @@ static int setCursor(WScreen * scr, WDefaultEntry * entry, void *tdata, void *ex return 0; } + +static int updateDock(WScreen * scr, WDefaultEntry * entry, + void *tdata, void *extra_data) { + (void) entry; + (void) tdata; + (void) extra_data; + + if (scr->dock) + wDockSwap(scr->dock); + + return 0; +}