зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1774694: Function, browser, media and volume keys should not hide cursor on Windows r=cmartin
Also includes the Fn key, which isn't documented to map to a special virtual key code but maps to 0xff, an undefined code, on tested machines. Differential Revision: https://phabricator.services.mozilla.com/D149928
This commit is contained in:
Родитель
bd09497378
Коммит
96409faec1
|
@ -671,11 +671,16 @@ static bool IsMouseVanishKey(WPARAM aVirtKey) {
|
|||
case VK_RIGHT:
|
||||
case VK_PRIOR: // PgUp
|
||||
case VK_NEXT: // PgDn
|
||||
case 0xff: // Undefined. May be sent for Fn key.
|
||||
return false;
|
||||
default:
|
||||
// Return true unless Ctrl or Alt is pressed
|
||||
// Vanish unless Ctrl or Alt is also pressed, or if a key in
|
||||
// a relevant range is pressed.
|
||||
// The range between VK_F1 and VK_LAUNCH_APP2 includes control,
|
||||
// function, browser, volume and media keys, all of which we ignore.
|
||||
return (GetKeyState(VK_CONTROL) & 0x8000) != 0x8000 &&
|
||||
(GetKeyState(VK_MENU) & 0x8000) != 0x8000;
|
||||
(GetKeyState(VK_MENU) & 0x8000) != 0x8000 &&
|
||||
(aVirtKey < VK_F1 || aVirtKey > VK_LAUNCH_APP2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче