viewSelector: Don't unfocus other modals on reset

Don't drop the key focus on Clutter's side if anything but the overview has
pushed a modal (e.g. system modals when activated using the overview).

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/618

(cherry picked from commit fffe58f829)
This commit is contained in:
Andrea Azzarone 2018-10-04 14:05:44 +01:00 committed by Marco Trevisan (Treviño)
parent 1e929357e0
commit 219118e633

View File

@ -460,7 +460,11 @@ var ViewSelector = new Lang.Class({
},
reset() {
global.stage.set_key_focus(null);
// Don't drop the key focus on Clutter's side if anything but the
// overview has pushed a modal (e.g. system modals when activated using
// the overview).
if (Main.modalCount <= 1)
global.stage.set_key_focus(null);
this._entry.text = '';