legacyTray: Pass on keyboard events to the icon

There is currently no way to trigger an icon's right-click menu by
keyboard. While there's a good chance that the icon will ignore
<shift>F10 and similar shortcuts, passing on key events will at
least make it work for some icons ...

https://bugzilla.gnome.org/show_bug.cgi?id=746487
This commit is contained in:
Florian Müllner 2015-03-19 23:07:12 +01:00
parent 28ef88911c
commit f2c1a416bf

View File

@ -162,6 +162,11 @@ const LegacyTray = new Lang.Class({
function() { function() {
icon.click(Clutter.get_current_event()); icon.click(Clutter.get_current_event());
}); });
button.connect('key-press-event',
function() {
icon.click(Clutter.get_current_event());
return Clutter.EVENT_PROPAGATE;
});
button.connect('key-focus-in', Lang.bind(this, button.connect('key-focus-in', Lang.bind(this,
function() { function() {
this._concealHandle.show(); this._concealHandle.show();