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

Inhibit workspace animations when workspaces view is open #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented May 4, 2024

Fixes pop-os/cosmic-workspaces-epoch#27.

We want this to apply to changes to workspace either through keybindings or the cosmic-workspaces UI, so it adding a check here seems reasonable. In principle it could be good to have some kind of privileged protocol for setting things like this.

We may also want a configuration option to disable animations at some point.

Fixes pop-os/cosmic-workspaces-epoch#27.

We want this to apply to changes to workspace either through keybindings
or the cosmic-workspaces UI, so it adding a check here seems reasonable.
In principle it could be good to have some kind of privileged protocol
for setting things like this.

We may also want a configuration option to disable animations at some
point.
@ids1024 ids1024 requested a review from a team May 4, 2024 00:09
@ids1024
Copy link
Member Author

ids1024 commented May 4, 2024

Unrelated to this specific change, I'm not sure exactly what the else condition in activate is meant to help with.

It does cause weird behavior if you call super+<num> twice in rapid succession, so it animates but then jumps back to the start of the animation.

@ryanabx
Copy link
Contributor

ryanabx commented May 4, 2024

It does cause weird behavior if you call super+<num> twice in rapid succession, so it animates but then jumps back to the start of the animation.

This can also be triggered with the other workspace switching methods:

Super + ctrl + up/down same way in rapid succession

Four finger swipe same direction in rapid succession

let layer_map = layer_map_for_output(&self.output);
let animate = !layer_map
.layers()
.any(|l| l.namespace() == WORKSPACE_OVERVIEW_NAMESPACE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How weird is this interaction with the touchpad gestures? I imagine it feels quite bad when the workspace abruptly changes. We probably just want to disable the gestures for now, when the overview is active?

@Drakulix
Copy link
Member

Drakulix commented May 6, 2024

It does cause weird behavior if you call super+ twice in rapid succession, so it animates but then jumps back to the start of the animation.

Yes that shouldn't reset the animation, but rather just change the target workspace, because I didn't want to implement an animation queue just yet. 😅

In principle it could be good to have some kind of privileged protocol for setting things like this.

Yeah absolutely, I don't like hard-coding all these exceptions for the app_id. It might make an incentive for any alternative projects to re-use it.

Lets first figure out, what the overview needs first though and then design a protocol. So short-term these kinda changes are totally fine for me.

But the protocol could also help with excluding the view from rendering and possibly also letting cosmic-comp handle the background rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inhibit cosmic-comp animation when changing workspace
3 participants