diff --git a/NEWS b/NEWS index ed03cf05..499c3c0b 100644 --- a/NEWS +++ b/NEWS @@ -81,6 +81,12 @@ command: $ wdwrite WindowMaker StrictWindozeCycling NO +If you find yourself regularly opening the switchpanel just to visualise open +windows, you can run the following command to force the first "FocusNextKey" +or similar shortcut to open the panel without switching to a new window. + +$ wdwrite WindowMaker SwitchPanelOnlyOpen YES + --- 0.95.2 diff --git a/src/WindowMaker.h b/src/WindowMaker.h index bc034d93..100f75b5 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -419,6 +419,7 @@ typedef struct WPreferences { char cycle_active_head_only; /* Cycle only windows on the active head */ char cycle_ignore_minimized; /* Ignore minimized windows when cycling */ char strict_windoze_cycle; /* don't close switchpanel when shift is released */ + char panel_only_open; /* Only open the switchpanel; don't switch */ /* 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 */ diff --git a/src/cycling.c b/src/cycling.c index bae12be7..78449b4e 100644 --- a/src/cycling.c +++ b/src/cycling.c @@ -129,7 +129,7 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next, Bool class_onl if (swpanel) { - if (wwin->flags.mapped) + if (wwin->flags.mapped && !wPreferences.panel_only_open) newFocused = wSwitchPanelSelectNext(swpanel, !next, True, False); else newFocused = wSwitchPanelSelectFirst(swpanel, False); diff --git a/src/defaults.c b/src/defaults.c index 50db1d44..dde87b51 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -478,6 +478,8 @@ WDefaultEntry optionList[] = { &wPreferences.single_click, getBool, NULL, NULL, NULL}, {"StrictWindozeCycle", "YES", NULL, &wPreferences.strict_windoze_cycle, getBool, NULL, NULL, NULL}, + {"SwitchPanelOnlyOpen", "NO", NULL, + &wPreferences.panel_only_open, getBool, NULL, NULL, NULL}, /* style options */