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

Fix StartWindozeCycle() shift key behaviour.

As the name implies, StartWindozeCycle() cycles windows in the same way
that a popular commercially-available operating system does.  However
Window Maker's handling of the shift key in the switchpanel does not
currently mirror that of its commercial counterpart.

In the popular operating system:

  Holding alt and shift then pressing and releasing tab will highlight
  the previous window in the switcher.

  Releasing shift with alt still held will not close the switcher.

  The window change is commited when alt is released.

In Window Maker:

  Holding alt and shift then pressing and releasing tab will highlight
  the previous window in the switchpanel.

  Releasing shift with alt still held will close the switchpanel and commit
  the window change.

This patch adds the StrictWindozeCycle boolean preference.  When it is
set to YES the switchpanel will remain open as long as alt is held even
if shift is pressed and released.
This commit is contained in:
Iain Patterson
2013-04-22 10:49:45 +01:00
committed by Carlos R. Mafra
parent 29a5267485
commit c9937f6f6a
3 changed files with 7 additions and 0 deletions

View File

@@ -418,6 +418,7 @@ typedef struct WPreferences {
int history_lines; /* history of "Run..." dialog */ int history_lines; /* history of "Run..." dialog */
char cycle_active_head_only; /* Cycle only windows on the active head */ char cycle_active_head_only; /* Cycle only windows on the active head */
char cycle_ignore_minimized; /* Ignore minimized windows when cycling */ char cycle_ignore_minimized; /* Ignore minimized windows when cycling */
char strict_windoze_cycle; /* don't close switchpanel when shift is released */
/* All delays here are in ms. 0 means instant auto-action. */ /* 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_raise_delay; /* Delay after which the clip will be raised when entered */

View File

@@ -191,6 +191,10 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next, Bool class_onl
case KeyRelease: case KeyRelease:
if (ev.xkey.keycode == shiftLKey || ev.xkey.keycode == shiftRKey)
if (wPreferences.strict_windoze_cycle)
break;
for (i = 0; i < 8 * keymap->max_keypermod; i++) { for (i = 0; i < 8 * keymap->max_keypermod; i++) {
int mask = 1 << (i / keymap->max_keypermod); int mask = 1 << (i / keymap->max_keypermod);

View File

@@ -474,6 +474,8 @@ WDefaultEntry optionList[] = {
&wPreferences.dont_blink, getBool, NULL, NULL, NULL}, &wPreferences.dont_blink, getBool, NULL, NULL, NULL},
{"SingleClickLaunch", "NO", NULL, {"SingleClickLaunch", "NO", NULL,
&wPreferences.single_click, getBool, NULL, NULL, NULL}, &wPreferences.single_click, getBool, NULL, NULL, NULL},
{"StrictWindozeCycle", "NO", NULL,
&wPreferences.strict_windoze_cycle, getBool, NULL, NULL, NULL},
/* style options */ /* style options */