From 1d174044713a79f16c9351e73a9931474b23a5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 10 Sep 2019 08:49:50 +0200 Subject: [PATCH] selectArea: Ignore motion events once we got a result When selecting an area for screenshot we monitor the events while we've valid coordinates in order to redraw the rubber band. However, we don't stop ignore the motion events after button release and so while animating. This might cause an unwanted effect if moving the mouse away during fade out that is way more visible slowing-down the animations. To fix this ignore any motion event once we've set the results. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/711 --- js/ui/screenshot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 377879bfb..c9ede2fc1 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -271,7 +271,7 @@ var SelectArea = class { } _onMotionEvent(actor, event) { - if (this._startX == -1 || this._startY == -1) + if (this._startX == -1 || this._startY == -1 || this._result) return Clutter.EVENT_PROPAGATE; [this._lastX, this._lastY] = event.get_coords();