shellDBus: Actually emit AcceleratorDeactivated signal

Add the missing plumbing to have this signal emitted via D-Bus.

Fixes: e53f69f9d ("shellDBus: Add AcceleratorDeactivated D-Bus signal")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3617>
This commit is contained in:
Carlos Garnacho 2025-01-28 11:44:59 +01:00 committed by Marge Bot
parent 8043714478
commit fecd5cdd6c

View File

@ -276,7 +276,7 @@ export class GnomeShell {
invocation.return_value(null); invocation.return_value(null);
} }
_emitAcceleratorActivated(action, device, timestamp) { _emitAcceleratorSignal(signal, action, device, timestamp) {
let destination = this._grabbedAccelerators.get(action); let destination = this._grabbedAccelerators.get(action);
if (!destination) if (!destination)
return; return;
@ -296,10 +296,20 @@ export class GnomeShell {
destination, destination,
this._dbusImpl.get_object_path(), this._dbusImpl.get_object_path(),
info?.name ?? null, info?.name ?? null,
'AcceleratorActivated', signal,
GLib.Variant.new('(ua{sv})', [action, params])); GLib.Variant.new('(ua{sv})', [action, params]));
} }
_emitAcceleratorActivated(action, device, timestamp) {
this._emitAcceleratorSignal(
'AcceleratorActivated', action, device, timestamp);
}
_emitAcceleratorDeactivated(action, device, timestamp) {
this._emitAcceleratorSignal(
'AcceleratorDeactivated', action, device, timestamp);
}
_grabAcceleratorForSender(accelerator, modeFlags, grabFlags, sender) { _grabAcceleratorForSender(accelerator, modeFlags, grabFlags, sender) {
let bindingAction = global.display.grab_accelerator(accelerator, grabFlags); let bindingAction = global.display.grab_accelerator(accelerator, grabFlags);
if (bindingAction === Meta.KeyBindingAction.NONE) if (bindingAction === Meta.KeyBindingAction.NONE)