From 219118e63381218f91815f3f7e0adb980fe90a04 Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Thu, 4 Oct 2018 14:05:44 +0100 Subject: [PATCH] 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 fffe58f829d027e1861f229ab3bf367a5f7764e5) --- js/ui/viewSelector.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index c46afc505..24fd5de2b 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -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 = '';