mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
panelMenu: Fix keynav of menu-less buttons
The left/right navigation between top bar buttons is usually handled by a key-press handler on the button's menu. However when a DummyMenu is used, the button itself serves as fake menu actor and will get grabbed when "opening" the menu. Due to that grab, the event is not propagated to the stage, and regular keynav does not work. To avoid the focus getting stuck in that case, add an explicit key-press handler that bypasses the grab. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2734>
This commit is contained in:
parent
cde7d44a28
commit
ecb274cee0
1 changed files with 3 additions and 0 deletions
|
|
@ -108,6 +108,9 @@ var Button = GObject.registerClass({
|
|||
this.menu = new PopupMenu.PopupDummyMenu(this);
|
||||
else
|
||||
this.setMenu(new PopupMenu.PopupMenu(this, menuAlignment, St.Side.TOP, 0));
|
||||
|
||||
this.connect('key-press-event',
|
||||
(o, ev) => global.focus_manager.navigate_from_event(ev));
|
||||
}
|
||||
|
||||
setSensitive(sensitive) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue