[gnome-shell] grabHelper: Use focus_default_window



commit 4153feeb15438634addc97286480fc12827c5425
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 4 14:32:15 2012 -0500

    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 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index 3623a0f..f6b11cc 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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]