S&T: Activate S&T when only option down

and not any other modifier such as command or control or shift.

Fixes #10511

We need to be more strict here because Tracker defines Cmd+Opt+Up and
Cmd+Opt+Down shortcuts, S&T shouldn't override them.
This commit is contained in:
John Scipione 2014-02-06 13:12:48 -05:00
parent d0477fb673
commit b9590dc919
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ StackAndTile::KeyPressed(uint32 what, int32 key, int32 modifiers)
// switch to and from stacking and snapping mode // switch to and from stacking and snapping mode
bool wasPressed = fSATKeyPressed; bool wasPressed = fSATKeyPressed;
fSATKeyPressed = (what == B_MODIFIERS_CHANGED fSATKeyPressed = (what == B_MODIFIERS_CHANGED
&& (modifiers & B_OPTION_KEY) != 0) && (modifiers & 0xff) == B_OPTION_KEY)
|| (what == B_UNMAPPED_KEY_DOWN && key == kRightOptionKey); || (what == B_UNMAPPED_KEY_DOWN && key == kRightOptionKey);
if (wasPressed && !fSATKeyPressed) if (wasPressed && !fSATKeyPressed)
_StopSAT(); _StopSAT();