Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cancelling gesture in multitasking view #2149

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/Widgets/MonitorClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace Gala {
*/
public void close (bool with_gesture = false, bool is_cancel_animation = false) {
window_container.restack_windows ();
window_container.close (with_gesture, is_cancel_animation);
window_container.close (with_gesture);
}

private void window_left (int window_monitor, Meta.Window window) {
Expand Down
6 changes: 3 additions & 3 deletions src/Widgets/WindowClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public class Gala.WindowClone : Clutter.Actor {
*
* @param animate Animate the transformation of the placement
*/
public void transition_to_original_state (bool with_gesture = false, bool is_cancel_animation = false) {
public void transition_to_original_state (bool with_gesture = false) {
var outer_rect = window.get_frame_rect ();

unowned var display = window.get_display ();
Expand Down Expand Up @@ -332,9 +332,9 @@ public class Gala.WindowClone : Clutter.Actor {
* Animate the window to the given slot
*/
#if HAS_MUTTER45
public void take_slot (Mtk.Rectangle rect, bool from_window_position, bool with_gesture = false, bool is_cancel_animation = false) {
public void take_slot (Mtk.Rectangle rect, bool from_window_position, bool with_gesture = false) {
#else
public void take_slot (Meta.Rectangle rect, bool from_window_position, bool with_gesture = false, bool is_cancel_animation = false) {
public void take_slot (Meta.Rectangle rect, bool from_window_position, bool with_gesture = false) {
#endif
slot = rect;
active = false;
Expand Down
6 changes: 3 additions & 3 deletions src/Widgets/WindowCloneContainer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ namespace Gala {

foreach (var tilable in window_positions) {
unowned var clone = (WindowClone) tilable.id;
clone.take_slot (tilable.rect, opening, with_gesture, is_cancel_animation);
clone.take_slot (tilable.rect, opening && !is_cancel_animation, with_gesture);
}
}

Expand Down Expand Up @@ -400,15 +400,15 @@ namespace Gala {
* Calls the transition_to_original_state() function on each child
* to make them take their original locations again.
*/
public void close (bool with_gesture = false, bool is_cancel_animation = false) {
public void close (bool with_gesture = false) {
if (!opened) {
return;
}

opened = false;

foreach (var window in get_children ()) {
((WindowClone) window).transition_to_original_state (with_gesture, is_cancel_animation);
((WindowClone) window).transition_to_original_state (with_gesture);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Widgets/WorkspaceClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ namespace Gala {
update_size (monitor);

new GesturePropertyTransition (this, gesture_tracker, "x", initial_x, target_x).start (with_gesture);
new GesturePropertyTransition (background, gesture_tracker, "scale-x", 1.0d, (double) scale).start (with_gesture);
new GesturePropertyTransition (background, gesture_tracker, "scale-y", 1.0d, (double) scale).start (with_gesture);
new GesturePropertyTransition (background, gesture_tracker, "scale-x", null, (double) scale).start (with_gesture);
new GesturePropertyTransition (background, gesture_tracker, "scale-y", null, (double) scale).start (with_gesture);

#if HAS_MUTTER45
Mtk.Rectangle area = {
Expand Down Expand Up @@ -415,7 +415,7 @@ namespace Gala {
new GesturePropertyTransition (background, gesture_tracker, "scale-x", null, 1.0d).start (with_gesture);
new GesturePropertyTransition (background, gesture_tracker, "scale-y", null, 1.0d).start (with_gesture);

window_container.close (with_gesture, is_cancel_animation);
window_container.close (with_gesture);
}
}
}
Loading