Skip to content

Commit dd3b1f5

Browse files
authored
Merge branch 'main' into lenemter/fix-menus
2 parents b27a8ba + 847ca2e commit dd3b1f5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Gestures/GestureController.vala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,20 @@ public class Gala.GestureController : Object {
125125

126126
private void prepare () {
127127
if (timeline != null) {
128-
timeline.stop ();
129128
timeline = null;
129+
} else {
130+
target.propagate (START, action, progress);
130131
}
131-
132-
target.propagate (START, action, progress);
133132
}
134133

135134
private bool gesture_detected (GestureBackend backend, Gesture gesture, uint32 timestamp) {
135+
if (recognizing || !enabled) {
136+
return false;
137+
}
138+
136139
var recognized_action = GestureSettings.get_action (gesture, out _action_info);
137-
recognizing = enabled && (!wm.filter_action (recognized_action) && recognized_action == action ||
138-
backend == scroll_backend && recognized_action == NONE);
140+
recognizing = !wm.filter_action (recognized_action) && recognized_action == action ||
141+
backend == scroll_backend && recognized_action == NONE;
139142

140143
if (recognizing) {
141144
if (gesture.direction == UP || gesture.direction == RIGHT || gesture.direction == OUT) {
@@ -263,13 +266,10 @@ public class Gala.GestureController : Object {
263266
timeline = spring;
264267
}
265268

266-
private void finished (bool is_finished = true) {
269+
private void finished (bool is_finished = true) requires (is_finished) {
267270
target.propagate (END, action, progress);
268271
timeline = null;
269-
270-
if (is_finished) {
271-
_action_info = null;
272-
}
272+
_action_info = null;
273273
}
274274

275275
/**

0 commit comments

Comments
 (0)