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

Don't manually map notifications while nudge animation is playing #1611

Merged
merged 4 commits into from Apr 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/WindowManager.vala
Expand Up @@ -113,6 +113,7 @@ namespace Gala {

private GestureTracker gesture_tracker;
private bool animating_switch_workspace = false;
private bool animating_nudge = false;
private bool switch_workspace_with_gesture = false;

/**
Expand Down Expand Up @@ -529,7 +530,7 @@ namespace Gala {
* {@inheritDoc}
*/
public void switch_to_next_workspace (Meta.MotionDirection direction) {
if (animating_switch_workspace) {
if (animating_switch_workspace || animating_nudge) {
return;
}

Expand All @@ -554,7 +555,7 @@ namespace Gala {
return;
}

animating_switch_workspace = true;
animating_nudge = true;
var nudge_gap = NUDGE_GAP * InternalUtils.get_ui_scaling_factor ();

float dest = 0;
Expand Down Expand Up @@ -586,7 +587,7 @@ namespace Gala {
ui_group.add_transition ("nudge", nudge_gesture);

switch_workspace_with_gesture = false;
animating_switch_workspace = false;
animating_nudge = false;
};

if (!switch_workspace_with_gesture) {
Expand All @@ -603,7 +604,7 @@ namespace Gala {
nudge.set_key_frames (keyframes);
nudge.set_values (x);
nudge.completed.connect (() => {
animating_switch_workspace = false;
animating_nudge = false;
});

ui_group.add_transition ("nudge", nudge);
Expand Down Expand Up @@ -1763,6 +1764,7 @@ namespace Gala {
|| AnimationDuration.WORKSPACE_SWITCH == 0
|| (direction != Meta.MotionDirection.LEFT && direction != Meta.MotionDirection.RIGHT)
|| animating_switch_workspace
|| animating_nudge
|| workspace_view.is_opened ()
|| window_overview.is_opened ()) {
animating_switch_workspace = false;
Expand Down