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

Workspace animation jiggly #325

Closed
musjj opened this issue Feb 27, 2024 · 8 comments
Closed

Workspace animation jiggly #325

musjj opened this issue Feb 27, 2024 · 8 comments

Comments

@musjj
Copy link
Contributor

musjj commented Feb 27, 2024

Mine:

mine.mp4

Yours:

aylur.mp4

This is something that's been driving me nuts, but my workspace animation is "jiggly" for some reason. When it animates, it kinda shifts the spacing in a weird way.

I copied the workspace part of your dotfiles pretty closely, so I'm not sure what went wrong here.

@Aylur
Copy link
Owner

Aylur commented Feb 27, 2024

mine used to be like that too, but I just got used to it and didn't even notice that it went away
It used to be buttons inside an eventbox, but now its just a button with labels inside, maybe that caused it?

@musjj
Copy link
Contributor Author

musjj commented Mar 10, 2024

I wonder how Gnome implements this in their shell. From my casual observation, they don't have this problem.

I'm actually noticing that your implementation also "jiggles" when transitioning between the "empty" workspaces. Maybe Gnome is manually animating it with js?

@musjj musjj closed this as completed Mar 10, 2024
@musjj musjj reopened this Mar 10, 2024
@Aylur
Copy link
Owner

Aylur commented Mar 10, 2024

it jiggles because an empty widget takes up less space than an occupied one
gnome-shell is tightly integrated with with its compositor, which lets them follow workspaces with its animation

@musjj
Copy link
Contributor Author

musjj commented Mar 13, 2024

Hmmm, I kinda doubt that compositors can manipulate a UI element like this (or if it's even worth doing).

I looked through the gnome-shell's repo and just as I suspected, they're manually animating everything in js without a single css transition in sight. A few relevant places in the codebase:

Might look into this further and see if I can replicate in ags.

@Aylur
Copy link
Owner

Aylur commented Mar 13, 2024

yes, but they are querying the workspace positions through Meta which are the bindings to the compositor, thats how the animation can follow swipe gestures

@musjj
Copy link
Contributor Author

musjj commented Mar 13, 2024

Oh, not sure about swipe gestures. Haven't used Gnome that much, but I'm mostly just annoyed with the jiggliness/unstableness. So I don't think I'd be needing swipe gestures.

@TheMelbine
Copy link

TheMelbine commented Jul 26, 2024

it jiggles because an empty widget takes up less space than an occupied one gnome-shell is tightly integrated with with its compositor, which lets them follow workspaces with its animation

I think you're not quite getting the point, it's not about the element pushing each other away, it's all about the smoothness of the animation, for some reason the last frames seem to skip.

P.s. I am also looking for a solution for this problem, if anyone knows how to fix this, let me know and want to add that I'm absolutely not sure of what I'm saying, I'm new with it

test.mp4

@musjj
Copy link
Contributor Author

musjj commented Jul 27, 2024

More specifically, the dot kind of grows a bit faster than it shrinks. So it causes the overall length of the widget to grow an extra pixel or two as the dots transitions. I once tried to set the css transition timing to linear, but it just made it worse for some reason.

To visualize the transition in ASCII (think of the |-| as a workspace dot):

|------|-|-|

|-----|----|-|

|----|-----|-|

|---|------|-|

|--|------|-|

|-|------|-|

Makes me wonder whether the issue still persists in GTK4.

@Aylur Aylur mentioned this issue Sep 25, 2024
Merged
@Aylur Aylur closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
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

No branches or pull requests

3 participants