From 4153feeb15438634addc97286480fc12827c5425 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 4 Dec 2012 14:32:15 -0500 Subject: [PATCH] grabHelper: Use focus_default_window This prevents us from having to track the previously focused window. https://bugzilla.gnome.org/show_bug.cgi?id=689653 --- js/ui/grabHelper.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js index 3623a0f66..f6b11ccdd 100644 --- a/js/ui/grabHelper.js +++ b/js/ui/grabHelper.js @@ -204,7 +204,6 @@ const GrabHelper = new Lang.Class({ this._grabbedFromKeynav = hadFocus; this._preGrabInputMode = global.stage_input_mode; - this._prevFocusedWindow = metaDisplay.focus_window; if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE || this._preGrabInputMode == Shell.StageInputMode.NORMAL) { @@ -243,13 +242,7 @@ const GrabHelper = new Lang.Class({ global.set_stage_input_mode(Shell.StageInputMode.FOCUSED); } - if (this._prevFocusedWindow) { - let metaDisplay = global.screen.get_display(); - if (!metaDisplay.focus_window) { - metaDisplay.set_input_focus_window(this._prevFocusedWindow, - false, global.get_current_time()); - } - } + global.screen.focus_default_window(global.get_current_time()); }, // ignoreRelease: