viewSelector: Only reset search entry if it has key focus
If the search entry does not have any text typed in and a button press happens outside of the search entry, we set key focus to NULL to make the search entry appear unfocused. This is quite intrusive and can easily cause unwanted focus changes, so change the captured-event handler to only call `reset()` if the search entry actually is focused. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
This commit is contained in:
parent
3094f86334
commit
5f10047b58
@ -577,6 +577,7 @@ var ViewSelector = class {
|
||||
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
|
||||
let source = event.get_source();
|
||||
if (source != this._text &&
|
||||
this._text.has_key_focus() &&
|
||||
this._text.text == '' &&
|
||||
!this._text.has_preedit () &&
|
||||
!Main.layoutManager.keyboardBox.contains(source)) {
|
||||
|
Loading…
Reference in New Issue
Block a user