mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
popupMenu: Implement vfunc's for key focus in/out
As per the fact the menu item is an object we can just vfunc's. This is not possible for events as specific union object is passed instead of just the Clutter.Event. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
This commit is contained in:
parent
4258ae3ec2
commit
bdf66d7b62
1 changed files with 4 additions and 5 deletions
|
|
@ -95,9 +95,6 @@ var PopupBaseMenuItem = GObject.registerClass({
|
|||
}
|
||||
if (params.reactive && params.hover)
|
||||
this.connect('notify::hover', this._onHoverChanged.bind(this));
|
||||
|
||||
this.connect('key-focus-in', this._onKeyFocusIn.bind(this));
|
||||
this.connect('key-focus-out', this._onKeyFocusOut.bind(this));
|
||||
}
|
||||
|
||||
get actor() {
|
||||
|
|
@ -161,11 +158,13 @@ var PopupBaseMenuItem = GObject.registerClass({
|
|||
return Clutter.EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
_onKeyFocusIn(actor) {
|
||||
vfunc_key_focus_in() {
|
||||
super.vfunc_key_focus_in();
|
||||
this.setActive(true);
|
||||
}
|
||||
|
||||
_onKeyFocusOut(actor) {
|
||||
vfunc_key_focus_out() {
|
||||
super.vfunc_key_focus_out();
|
||||
this.setActive(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue