[gnome-shell/wip/exalm/gestures: 16/21] time
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/gestures: 16/21] time
- Date: Wed, 26 Jun 2019 09:31:28 +0000 (UTC)
commit 270c8fee925851d1f6b117c61ec0c4c9ad48be66
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Jun 25 23:07:14 2019 +0500
time
js/ui/swipeTracker.js | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js
index 0b8b94f5b..b47a444dd 100644
--- a/js/ui/swipeTracker.js
+++ b/js/ui/swipeTracker.js
@@ -81,11 +81,6 @@ var TouchSwipeGesture = GObject.registerClass({
});
}
- _get_time() {
- let event = this.get_last_event();
- return event.get_time();
- }
-
vfunc_gesture_prepare(actor) {
this._swept = false;
@@ -97,7 +92,7 @@ var TouchSwipeGesture = GObject.registerClass({
vfunc_gesture_progress(actor) {
let [dx, dy] = this.get_motion_delta(0);
- let time = this._get_time();
+ let time = Clutter.get_current_event_time();
this.emit('update', time, -dy / this._actor.height); // TODO: the height isn't always equal to the
actor height
return true;
@@ -106,7 +101,7 @@ var TouchSwipeGesture = GObject.registerClass({
vfunc_swipe(actor, direction) {
this._swept = true;
- let time = this._get_time();
+ let time = Clutter.get_current_event_time();
this.emit('end', time);
}
@@ -115,7 +110,7 @@ var TouchSwipeGesture = GObject.registerClass({
if (this._swept)
return;
- let time = this._get_time();
+ let time = Clutter.get_current_event_time();
this.emit('cancel', time);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]