[gnome-shell/wip/exalm/swipes] swipeTracker: Reset before emitting 'end' and not after
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/swipes] swipeTracker: Reset before emitting 'end' and not after
- Date: Sat, 13 Mar 2021 15:04:02 +0000 (UTC)
commit e7645426b335433e92a3a5c0d6b7b0b732cb6ae0
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sat Mar 13 19:57:53 2021 +0500
swipeTracker: Reset before emitting 'end' and not after
If the actor is unmapped in the handler, the touch gesture will cancel.
Since we haven't reset the state yet, it will still work and will actually
cancel the gesture, so reset before that instead.
Fixes overview cancelling when trying to open it with a swipe.
js/ui/swipeTracker.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js
index 8f80bfb3e3..9c3671d3cf 100644
--- a/js/ui/swipeTracker.js
+++ b/js/ui/swipeTracker.js
@@ -741,8 +741,8 @@ var SwipeTracker = GObject.registerClass({
if (duration > 0)
duration = Math.clamp(duration, MIN_ANIMATION_DURATION, maxDuration);
- this.emit('end', duration, endProgress);
this._reset();
+ this.emit('end', duration, endProgress);
}
_cancelTouchGesture(_gesture, time, distance) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]