Skip to content

Commit 7a6a54b

Browse files
committed
Fix warnings
1 parent 37f3a6d commit 7a6a54b

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/Gestures/PanBackend.vala

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,17 @@ public class Gala.PanBackend : Object {
7878
}
7979

8080
private void on_gesture_end () {
81-
update_coords ();
82-
83-
on_end (calculate_percentage (), pan_action.get_last_event (0).get_time ());
81+
on_end (calculate_percentage (), Gdk.CURRENT_TIME);
8482

8583
direction = GestureDirection.UNKNOWN;
84+
last_n_points = 0;
85+
last_x_coord = 0;
86+
last_y_coord = 0;
8687
}
8788

8889
private bool on_pan (Clutter.PanAction pan_action, Clutter.Actor actor, bool interpolate) {
8990
uint64 time = pan_action.get_last_event (0).get_time ();
9091

91-
update_coords ();
92-
93-
on_update (calculate_percentage (), time);
94-
95-
return true;
96-
}
97-
98-
private void update_coords () {
9992
float x, y;
10093
pan_action.get_motion_coords (0, out x, out y);
10194

@@ -107,6 +100,10 @@ public class Gala.PanBackend : Object {
107100
last_x_coord = x;
108101
last_y_coord = y;
109102
last_n_points = pan_action.get_n_current_points ();
103+
104+
on_update (calculate_percentage (), time);
105+
106+
return true;
110107
}
111108

112109
private double calculate_percentage () {

0 commit comments

Comments
 (0)