Do not grab key focus when showing previews

This commit is contained in:
Charles Gagnon
2019-05-31 17:27:06 -04:00
parent f63b39b2e8
commit 9b299ff4de
2 changed files with 3 additions and 9 deletions

View File

@@ -181,11 +181,9 @@ var taskbarAppIcon = Utils.defineClass({
Lang.bind(this, this._onFocusAppChanged));
this._windowEnteredMonitorId = this._windowLeftMonitorId = 0;
this._stateChangedId = this.app.connect('windows-changed',
Lang.bind(this, this.onWindowsChanged));
if (!this.window) {
this._stateChangedId = this.app.connect('windows-changed', Lang.bind(this, this.onWindowsChanged));
if (!this.window) {
if (this._dtpSettings.get_boolean('isolate-monitors')) {
this._windowEnteredMonitorId = Utils.DisplayWrapper.getScreen().connect('window-entered-monitor', this.onWindowEnteredOrLeft.bind(this));
this._windowLeftMonitorId = Utils.DisplayWrapper.getScreen().connect('window-left-monitor', this.onWindowEnteredOrLeft.bind(this));

View File

@@ -174,7 +174,6 @@ var PreviewMenu = Utils.defineClass({
this.show();
this._refreshGlobals();
this.grab_key_focus();
}
this._mergeWindows(appIcon);
@@ -197,7 +196,6 @@ var PreviewMenu = Utils.defineClass({
this._animateOpenOrClose(false, () => this._resetHiddenState());
}
Utils.DisplayWrapper.getScreen().focus_default_window(1);
this._box.get_children().forEach(c => c.reactive = false);
this.menu.reactive = false;
this.currentAppIcon = null;
@@ -538,10 +536,8 @@ var PreviewMenu = Utils.defineClass({
}
Main.wm._blockAnimations = true;
workspace.activate(1);
workspace.activate(global.display.get_current_time_roundtrip());
Main.wm._blockAnimations = false;
this.grab_key_focus();
},
_focusMetaWindow: function(dimOpacity, window) {