Skip to content

Commit

Permalink
fix: update patch to make Windows key work with global shortcuts (#17566
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brenca authored and MarshallOfSound committed Mar 28, 2019
1 parent 5dd735f commit ebcd094
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion patches/common/chromium/command-ismediakey.patch
Expand Up @@ -46,7 +46,7 @@ index befe726af9c10b1563a7fc0bb77cc55f65943d5c..46c6fe08bab8471007f78d3ef227e519
GlobalShortcutListener* GlobalShortcutListener::GetInstance() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc
index eb58c51eb768bb013e293649e0308786c5482e21..e469e5115fce12fe5d382bd75d9c6f41fa24293e 100644
index f5d0ac4ba826ee4f023224ce90c6d8b6614c2912..380682029d20cab485bb8b52bd5c7d9cdc424c7d 100644
--- a/chrome/browser/extensions/global_shortcut_listener_win.cc
+++ b/chrome/browser/extensions/global_shortcut_listener_win.cc
@@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd,
Expand All @@ -58,6 +58,14 @@ index eb58c51eb768bb013e293649e0308786c5482e21..e469e5115fce12fe5d382bd75d9c6f41
ui::Accelerator accelerator(
ui::KeyboardCodeForWindowsKeyCode(key_code), modifiers);

@@ -98,6 +100,7 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl(
modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0;
modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0;
modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0;
+ modifiers |= accelerator.IsCmdDown() ? MOD_WIN : 0;

// Create an observer that registers a hot key for |accelerator|.
std::unique_ptr<gfx::SingletonHwndHotKeyObserver> observer =
diff --git a/chrome/browser/extensions/global_shortcut_listener_x11.cc b/chrome/browser/extensions/global_shortcut_listener_x11.cc
index 392cf3d58c64c088596e8d321a2ce37b0ec60b6e..43e30f47240dc10a3a9b950255d4e48792cc4159 100644
--- a/chrome/browser/extensions/global_shortcut_listener_x11.cc
Expand Down

0 comments on commit ebcd094

Please sign in to comment.