1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 12:00:31 +01:00

Update the dock position when "KeepDockOnPrimaryHead" is changed

This commit is contained in:
Torrance, Douglas
2023-01-18 11:42:59 +00:00
committed by Carlos R. Mafra
parent 8ed92efa3c
commit 515eb652c7

View File

@@ -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;
}