summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
Diffstat (limited to 'views/window')
-rw-r--r--views/window/window_win.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 6aa5224..c81fe27 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -1121,8 +1121,12 @@ void WindowWin::OnSysCommand(UINT notification_code, CPoint click) {
// Handle SC_KEYMENU, which means that the user has pressed the ALT
// key and released it, so we should focus the menu bar.
if ((notification_code & sc_mask) == SC_KEYMENU && click.x == 0) {
+ // Retrieve the status of shift and control keys to prevent consuming
+ // shift+alt keys, which are used by Windows to change input languages.
Accelerator accelerator(app::KeyboardCodeForWindowsKeyCode(VK_MENU),
- false, false, false);
+ !!(GetKeyState(VK_SHIFT) & 0x8000),
+ !!(GetKeyState(VK_CONTROL) & 0x8000),
+ false);
GetFocusManager()->ProcessAccelerator(accelerator);
return;
}