Skip to content

Commit ac47ff3

Browse files
committed
expo: Update the window's starting position when an update is
triggered, in case the window moved to a different monitor during a drag.
1 parent 1f56454 commit ac47ff3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

js/ui/expoThumbnail.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,14 @@ ExpoWorkspaceThumbnail.prototype = {
626626

627627
// We might have the window in our list already if it was on all workspaces and
628628
// now was moved to this workspace
629-
if (this.lookupIndex (metaWin) != -1)
629+
let winCloneIndex = this.lookupIndex(metaWin);
630+
if (winCloneIndex !== -1) {
631+
// the window's position on the workspace may have changed (dragging to a different monitor)
632+
// update its original location so overview on/off position correctly.
633+
this.windows[winCloneIndex].origX = win.x;
634+
this.windows[winCloneIndex].origY = win.y;
630635
return;
636+
}
631637

632638
if (!this.isMyWindow(win) || !this.isExpoWindow(win))
633639
return;

0 commit comments

Comments
 (0)