mirror of
https://github.com/electron/electron.git
synced 2026-01-09 07:28:12 -05:00
5871484: add widget parameter to OnCommandsChanged
GlobalAcceleratorListener::OnCommandsChanged gained a gfx::AcceleratedWidget parameter for window association in the GlobalShortcutListenerLinux implementation. Pass gfx::kNullAcceleratedWidget for Electron's usage. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5871484
This commit is contained in:
@@ -157,7 +157,8 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
|
||||
// received by GlobalShortcut will correspond to Alt+Shift+K as our command
|
||||
// id is basically a stringified accelerator.
|
||||
const std::string fake_extension_id = command_str + "+" + profile_id;
|
||||
instance->OnCommandsChanged(fake_extension_id, profile_id, commands, this);
|
||||
instance->OnCommandsChanged(fake_extension_id, profile_id, commands,
|
||||
gfx::kNullAcceleratedWidget, this);
|
||||
command_callback_map_[command_str] = callback;
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user