status/backlight: Fix keynav within discrete item
When representing the keyboard backlight levels as discrete items, it is currently not possible to keynav past the first button. Fix this by bypassing the usual event bubbling and passing key press events directly to the focus manager, similar to what we do for popup menu items. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3545>
This commit is contained in:
parent
730fcf34e9
commit
64c9baf412
@ -133,6 +133,10 @@ const DiscreteItem = GObject.registerClass({
|
||||
this._levelButtons.set(key, box);
|
||||
}
|
||||
|
||||
vfunc_key_press_event(event) {
|
||||
return global.focus_manager.navigate_from_event(event);
|
||||
}
|
||||
|
||||
_syncLevels() {
|
||||
this._levelButtons.get('off').visible = this.nLevels > 0;
|
||||
this._levelButtons.get('high').visible = this.nLevels > 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user