[gnome-shell/gnome-40] overview: Don't expect time argument from drag-end signal



commit 58051fd4798cb25d33f33e17a397f332944641ed
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Wed Feb 23 16:23:02 2022 +0100

    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>
    (cherry picked from commit bb1ec88dfaf96f9eb08f0c787e669216a4aa312c)

 js/ui/overview.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index bc3e7b038d..c1432effe0 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -265,7 +265,7 @@ var Overview = class {
         this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index();
     }
 
-    _onDragEnd(time) {
+    _onDragEnd() {
         this._inXdndDrag = false;
 
         // In case the drag was canceled while in the overview
@@ -273,7 +273,8 @@ var Overview = class {
         // the overview
         if (this._shown) {
             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._resetWindowSwitchTimeout();


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