windowManager: Drop sync_pointer() after relayouts

We should trust the Clutter machinery here, as it has code to trigger
focus changes triggered by relayouts.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>
This commit is contained in:
Carlos Garnacho 2020-12-18 13:27:39 +01:00 committed by Marge Bot
parent 2445212e35
commit 2799760244

View File

@ -203,8 +203,6 @@ var WorkspaceTracker = class {
this._windowEnteredMonitor.bind(this)); this._windowEnteredMonitor.bind(this));
global.display.connect('window-left-monitor', global.display.connect('window-left-monitor',
this._windowLeftMonitor.bind(this)); this._windowLeftMonitor.bind(this));
global.display.connect('restacked',
this._windowsRestacked.bind(this));
this._workspaceSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' }); this._workspaceSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this)); this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
@ -326,13 +324,6 @@ var WorkspaceTracker = class {
this._queueCheckWorkspaces(); this._queueCheckWorkspaces();
} }
_windowsRestacked() {
// Figure out where the pointer is in case we lost track of
// it during a grab. (In particular, if a trayicon popup menu
// is dismissed, see if we need to close the message tray.)
global.sync_pointer();
}
_queueCheckWorkspaces() { _queueCheckWorkspaces() {
if (this._checkWorkspacesId == 0) if (this._checkWorkspacesId == 0)
this._checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, this._checkWorkspaces.bind(this)); this._checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, this._checkWorkspaces.bind(this));