searchController: Adjust to Clutter.Stage.get_key_focus()
change
The method is now a plain getter of the `key-focus` property, so handle the case where it returns null. See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4256 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3633>
This commit is contained in:
parent
33ea672605
commit
a8d4c679eb
@ -186,9 +186,10 @@ export const SearchController = GObject.registerClass({
|
||||
}
|
||||
|
||||
_onStageKeyFocusChanged() {
|
||||
let focus = global.stage.get_key_focus();
|
||||
let appearFocused = this._entry.contains(focus) ||
|
||||
this._searchResults.contains(focus);
|
||||
const focus = global.stage.get_key_focus();
|
||||
const appearFocused = focus != null &&
|
||||
(this._entry.contains(focus) ||
|
||||
this._searchResults.contains(focus));
|
||||
|
||||
this._text.set_cursor_visible(appearFocused);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user