panel: Add keyboard shortcut to open app menu
With the application menu now being more than a stub, it has become a much more interesting target, so add a keyboard shortcut to open it directly. This should also ease some of the pain for focus-follows-mouse users. https://bugzilla.gnome.org/show_bug.cgi?id=672909
This commit is contained in:
@ -4,6 +4,7 @@ const Cairo = imports.cairo;
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gio = imports.gi.Gio;
|
||||
const GLib = imports.gi.GLib;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Lang = imports.lang;
|
||||
const Mainloop = imports.mainloop;
|
||||
const Meta = imports.gi.Meta;
|
||||
@ -1112,6 +1113,15 @@ const Panel = new Lang.Class({
|
||||
return true;
|
||||
},
|
||||
|
||||
openAppMenu: function() {
|
||||
let menu = this._appMenu.menu;
|
||||
if (Main.overview.visible || menu.isOpen)
|
||||
return;
|
||||
|
||||
menu.open();
|
||||
menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||
},
|
||||
|
||||
startStatusArea: function() {
|
||||
for (let i = 0; i < this._status_area_order.length; i++) {
|
||||
let role = this._status_area_order[i];
|
||||
|
Reference in New Issue
Block a user