overview: Don't expect time argument from drag-end signal

We actually don't get a time from the xdndHandler when it emits
drag-end, so we fail right now when calling
workspaceManager.get_workspace_by_index(time).

Fix it by getting the time ourselves instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2211>
This commit is contained in:
Jonas Dreßler 2022-02-23 16:23:02 +01:00 committed by Marge Bot
parent 5d1b9a429e
commit bb1ec88dfa

View File

@ -260,7 +260,7 @@ var Overview = class {
this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index(); this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index();
} }
_onDragEnd(time) { _onDragEnd() {
this._inXdndDrag = false; this._inXdndDrag = false;
// In case the drag was canceled while in the overview // In case the drag was canceled while in the overview
@ -268,7 +268,8 @@ var Overview = class {
// the overview // the overview
if (this._shown) { if (this._shown) {
let workspaceManager = global.workspace_manager; let workspaceManager = global.workspace_manager;
workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time); workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex)
.activate(global.get_current_time());
this.hide(); this.hide();
} }
this._resetWindowSwitchTimeout(); this._resetWindowSwitchTimeout();