[gnome-shell] selectArea: Ignore motion events once we got a result



commit 1d174044713a79f16c9351e73a9931474b23a5cb
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Tue Sep 10 08:49:50 2019 +0200

    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 377879bfb7..c9ede2fc1d 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();


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