messageTray: Make sure to always grab focus
If a widget isn't focusable or none of its children are focusable, then navigate_focus will return false and the key focus won't be set. We need to explicitly grab the key focus in this case. https://bugzilla.gnome.org/show_bug.cgi?id=671001
This commit is contained in:
parent
b0d161faad
commit
7d29e691a4
@ -261,7 +261,9 @@ const FocusGrabber = new Lang.Class({
|
||||
|
||||
this._hasFocus = true;
|
||||
|
||||
this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||
if (!this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false))
|
||||
this.actor.grab_key_focus();
|
||||
|
||||
this.emit('focus-grabbed');
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user