Skip to content

Commit 3c7cd1a

Browse files
authored
dnd.js: Fix window freeze on rapid taskbar clicks (#13462) (#13465)
Clean up any existing pointer grab before starting a new one in _onButtonPress. This prevents pointer grabs from accumulating when users click rapidly on taskbar icons, which could leave windows in an unresponsive state.
1 parent db0a5e9 commit 3c7cd1a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

js/ui/dnd.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ var _Draggable = new Lang.Class({
139139
if (Tweener.getTweenCount(actor))
140140
return false;
141141

142+
// Clean up any existing grab before starting a new one (fixes #13462)
143+
// This prevents pointer grabs from accumulating during rapid clicks
144+
if (this._onEventId) {
145+
this._ungrabActor(event);
146+
}
147+
142148
this._buttonDown = true;
143149
this._grabActor(event);
144150

0 commit comments

Comments
 (0)