shellDBus: Export the timestamp of shortcuts through D-Bus
So that apps launched through gnome-settings-daemon can get focused properly. https://bugzilla.gnome.org/show_bug.cgi?id=704859
This commit is contained in:
parent
9d250bec05
commit
db497a2ecf
@ -41,6 +41,7 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
|
|||||||
<signal name="AcceleratorActivated">
|
<signal name="AcceleratorActivated">
|
||||||
<arg name="action" type="u" />
|
<arg name="action" type="u" />
|
||||||
<arg name="deviceid" type="u" />
|
<arg name="deviceid" type="u" />
|
||||||
|
<arg name="timestamp" type="u" />
|
||||||
</signal>
|
</signal>
|
||||||
<property name="Mode" type="s" access="read" />
|
<property name="Mode" type="s" access="read" />
|
||||||
<property name="OverviewActive" type="b" access="readwrite" />
|
<property name="OverviewActive" type="b" access="readwrite" />
|
||||||
@ -79,8 +80,8 @@ const GnomeShell = new Lang.Class({
|
|||||||
this._grabbers = new Hash.Map();
|
this._grabbers = new Hash.Map();
|
||||||
|
|
||||||
global.display.connect('accelerator-activated', Lang.bind(this,
|
global.display.connect('accelerator-activated', Lang.bind(this,
|
||||||
function(display, action, deviceid) {
|
function(display, action, deviceid, timestamp) {
|
||||||
this._emitAcceleratorActivated(action, deviceid);
|
this._emitAcceleratorActivated(action, deviceid, timestamp);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -166,7 +167,7 @@ const GnomeShell = new Lang.Class({
|
|||||||
return invocation.return_value(GLib.Variant.new('(b)', [ungrabSucceeded]));
|
return invocation.return_value(GLib.Variant.new('(b)', [ungrabSucceeded]));
|
||||||
},
|
},
|
||||||
|
|
||||||
_emitAcceleratorActivated: function(action, deviceid) {
|
_emitAcceleratorActivated: function(action, deviceid, timestamp) {
|
||||||
let destination = this._grabbedAccelerators.get(action);
|
let destination = this._grabbedAccelerators.get(action);
|
||||||
if (!destination)
|
if (!destination)
|
||||||
return;
|
return;
|
||||||
@ -177,7 +178,7 @@ const GnomeShell = new Lang.Class({
|
|||||||
this._dbusImpl.get_object_path(),
|
this._dbusImpl.get_object_path(),
|
||||||
info ? info.name : null,
|
info ? info.name : null,
|
||||||
'AcceleratorActivated',
|
'AcceleratorActivated',
|
||||||
GLib.Variant.new('(uu)', [action, deviceid]));
|
GLib.Variant.new('(uuu)', [action, deviceid, timestamp]));
|
||||||
},
|
},
|
||||||
|
|
||||||
_grabAcceleratorForSender: function(accelerator, flags, sender) {
|
_grabAcceleratorForSender: function(accelerator, flags, sender) {
|
||||||
|
Loading…
Reference in New Issue
Block a user