Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/Gestures/GestureController.vala
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,20 @@ public class Gala.GestureController : Object {

private void prepare () {
if (timeline != null) {
timeline.stop ();
timeline = null;
} else {
target.propagate (START, action, progress);
}

target.propagate (START, action, progress);
}

private bool gesture_detected (GestureBackend backend, Gesture gesture, uint32 timestamp) {
if (recognizing || !enabled) {
return false;
}

var recognized_action = GestureSettings.get_action (gesture, out _action_info);
recognizing = enabled && (!wm.filter_action (recognized_action) && recognized_action == action ||
backend == scroll_backend && recognized_action == NONE);
recognizing = !wm.filter_action (recognized_action) && recognized_action == action ||
backend == scroll_backend && recognized_action == NONE;

if (recognizing) {
if (gesture.direction == UP || gesture.direction == RIGHT || gesture.direction == OUT) {
Expand Down Expand Up @@ -263,13 +266,10 @@ public class Gala.GestureController : Object {
timeline = spring;
}

private void finished (bool is_finished = true) {
private void finished (bool is_finished = true) requires (is_finished) {
target.propagate (END, action, progress);
timeline = null;

if (is_finished) {
_action_info = null;
}
_action_info = null;
}

/**
Expand Down
Loading