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
This commit is contained in:
parent
349c642d10
commit
4153feeb15
@ -204,7 +204,6 @@ const GrabHelper = new Lang.Class({
|
|||||||
|
|
||||||
this._grabbedFromKeynav = hadFocus;
|
this._grabbedFromKeynav = hadFocus;
|
||||||
this._preGrabInputMode = global.stage_input_mode;
|
this._preGrabInputMode = global.stage_input_mode;
|
||||||
this._prevFocusedWindow = metaDisplay.focus_window;
|
|
||||||
|
|
||||||
if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE ||
|
if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE ||
|
||||||
this._preGrabInputMode == Shell.StageInputMode.NORMAL) {
|
this._preGrabInputMode == Shell.StageInputMode.NORMAL) {
|
||||||
@ -243,13 +242,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._prevFocusedWindow) {
|
global.screen.focus_default_window(global.get_current_time());
|
||||||
let metaDisplay = global.screen.get_display();
|
|
||||||
if (!metaDisplay.focus_window) {
|
|
||||||
metaDisplay.set_input_focus_window(this._prevFocusedWindow,
|
|
||||||
false, global.get_current_time());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ignoreRelease:
|
// ignoreRelease:
|
||||||
|
Loading…
Reference in New Issue
Block a user