Skip to content

Commit 2ba0b1d

Browse files
committed
Fix merge
1 parent 72bc8b9 commit 2ba0b1d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/Gestures/GesturePropertyTransition.vala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* with easing without a gesture. Respects the enable animation setting.
1111
*/
1212
public class Gala.GesturePropertyTransition : Object {
13-
public delegate void DoneCallback (bool cancel_action);
13+
public delegate void DoneCallback (int completions);
1414

1515
/**
1616
* The actor whose property will be animated.
@@ -100,13 +100,13 @@ public class Gala.GesturePropertyTransition : Object {
100100

101101
if (actual_from_value.type () != current_value.type ()) {
102102
warning ("from_value of type %s is not of the same type as the property %s which is %s. Can't animate.", from_value.type_name (), property, current_value.type_name ());
103-
finish (true);
103+
finish (0);
104104
return;
105105
}
106106

107107
if (current_value.type () != to_value.type ()) {
108108
warning ("to_value of type %s is not of the same type as the property %s which is %s. Can't animate.", to_value.type_name (), property, current_value.type_name ());
109-
finish (true);
109+
finish (0);
110110
return;
111111
}
112112

@@ -152,9 +152,9 @@ public class Gala.GesturePropertyTransition : Object {
152152

153153
unowned var transition = actor.get_transition (property);
154154
if (transition == null) {
155-
finish (cancel_action);
155+
finish (completions);
156156
} else {
157-
transition.stopped.connect ((is_finished) => finish (cancel_action, is_finished));
157+
transition.stopped.connect ((is_finished) => finish (completions, is_finished));
158158
}
159159
};
160160

@@ -181,9 +181,9 @@ public class Gala.GesturePropertyTransition : Object {
181181
}
182182
}
183183

184-
private void finish (bool cancel_action, bool callback = true) {
184+
private void finish (int completions, bool callback = true) {
185185
if (callback && done_callback != null) {
186-
done_callback (cancel_action);
186+
done_callback (completions);
187187
}
188188

189189
unref ();

src/ShellClients/PanelClone.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ public class Gala.PanelClone : Object {
154154
Utils.x11_unset_window_pass_through (panel.window);
155155
}
156156

157-
new GesturePropertyTransition (clone, gesture_tracker, "y", null, calculate_clone_y (false)).start (with_gesture, (cancel_action) => {
158-
if (!cancel_action) {
157+
new GesturePropertyTransition (clone, gesture_tracker, "y", null, calculate_clone_y (false)).start (with_gesture, (completions) => {
158+
if (completions > 0) {
159159
clone.visible = false;
160160
panel_hidden = false;
161161
}

src/Widgets/MultitaskingView.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ namespace Gala {
678678

679679
// The callback needs to run at the same frame as the others (e.g. PanelClone) so we can't do a simple Timeout here
680680
// The actual transition does nothing here, since the opacity just stays at 255
681-
new GesturePropertyTransition (this, multitasking_gesture_tracker, "opacity", null, 255u).start (with_gesture, (cancel_action) => {
681+
new GesturePropertyTransition (this, multitasking_gesture_tracker, "opacity", null, 255u).start (with_gesture, (completions) => {
682682
if (!opening) {
683683
foreach (var container in window_containers_monitors) {
684684
container.visible = false;
@@ -695,7 +695,7 @@ namespace Gala {
695695

696696
animating = false;
697697

698-
if (cancel_action) {
698+
if (completions == 0) {
699699
toggle (false, true);
700700
}
701701
});

0 commit comments

Comments
 (0)