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:
Samuel Attard
2025-11-24 16:27:22 -08:00
parent ef03400d9a
commit 38306e2bfc

View File

@@ -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 {