mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
viewSelector: Send first printable keystroke to the search entry
StIMText used to handle key events for IM consumption in the capture phase, this made the search box work automagically with nothing explicitly focusing it. Since it's no longer the case, it has to be done somewhere.
This commit is contained in:
parent
70bc94946f
commit
e4ee944d8d
1 changed files with 9 additions and 0 deletions
|
|
@ -606,6 +606,15 @@ var ViewSelector = new Lang.Class({
|
|||
// - cancel the search
|
||||
this.reset();
|
||||
}
|
||||
} else if (!this._text.has_key_focus() &&
|
||||
(event.type() == Clutter.EventType.KEY_PRESS ||
|
||||
event.type() == Clutter.EventType.KEY_RELEASE)) {
|
||||
let unichar = event.get_key_unicode();
|
||||
|
||||
if (GLib.unichar_isprint(unichar)) {
|
||||
this._text.grab_key_focus();
|
||||
return this._text.event(event, false);
|
||||
}
|
||||
}
|
||||
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue