picom icon indicating copy to clipboard operation
picom copied to clipboard

Implement window animations

Open dccsillag opened this issue 2 years ago • 44 comments

This adds window animations, and would solve https://github.com/yshui/picom/issues/217. We use spring-based animations -- they are visually pleasing and handle interactions well, compared to parametric interpolation/animation.

This is still a work in progress -- remaining issues are being tracked in my fork's issue tracker.

I feel it's also worth mentioning that this might have quite a bit of code in common with https://github.com/yshui/picom/pull/766 (I haven't looked into it very carefully). However, with this code the work over at https://github.com/yshui/picom/pull/766 should be easily doable (~10 more lines of extra code), while it probably wouldn't work the other way around. I've also just stumbled into https://github.com/yshui/picom/issues/771#issuecomment-1028199080 -- this PR should make this very easy (because of the changes to the compose backend operation).

dccsillag avatar Feb 03 '22 21:02 dccsillag

Codecov Report

Merging #772 (51b2135) into next (cd50596) will decrease coverage by 0.63%. The diff coverage is 15.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next     #772      +/-   ##
==========================================
- Coverage   38.66%   38.03%   -0.64%     
==========================================
  Files          46       46              
  Lines        9724    10044     +320     
==========================================
+ Hits         3760     3820      +60     
- Misses       5964     6224     +260     
Impacted Files Coverage Δ
src/backend/gl/gl_common.c 14.76% <0.00%> (-0.05%) :arrow_down:
src/backend/gl/gl_common.h 30.23% <ø> (ø)
src/backend/xrender/xrender.c 0.00% <0.00%> (ø)
src/common.h 78.26% <ø> (ø)
src/config.h 23.52% <ø> (ø)
src/options.c 20.00% <0.00%> (-1.57%) :arrow_down:
src/utils.h 29.62% <0.00%> (-3.71%) :arrow_down:
src/win.h 78.12% <ø> (ø)
src/backend/backend.c 56.54% <12.50%> (-3.81%) :arrow_down:
src/win.c 64.23% <14.01%> (-3.90%) :arrow_down:
... and 8 more

codecov[bot] avatar Feb 03 '22 21:02 codecov[bot]

Paging @Arian8j2, do you think you can adapt your work to this? @dccsillag maybe you could give them a hand?

yshui avatar Feb 03 '22 21:02 yshui

Of course! I can tackle it tomorrow.

dccsillag avatar Feb 03 '22 21:02 dccsillag

Can you squash fixes into appropriate commits? If the fix is tricky or could be a common pitfall, you can add some comments in the code and/or the commit message (for example, https://github.com/yshui/picom/commit/ae0f82828e2ea6ccc47a6434871d041434e45193 seems to be interesting).

Will do!

Can you look at the coding style checks and fix them?

Yeah, of course. Would just running clang-format fix them?

Can you rebase your branch on top of next, instead of merging next into it? Unless this would be too much work for you.

Will try!

FYI -- I don't think I'll be able to work much on this stuff today; I'll be back on it partly tomorrow but mostly over the weekend.

dccsillag avatar Feb 03 '22 21:02 dccsillag

I don't think I'll be able to work much on this stuff today; I'll be back on it partly tomorrow but mostly over the weekend.

There is no hurry, please take your time. I won't be able to finish reviewing that quickly anyways.

yshui avatar Feb 03 '22 22:02 yshui

Paging @Arian8j2, do you think you can adapt your work to this? @dccsillag maybe you could give them a hand?

This is huge animation system and that is so cool to be part of it.

Can you squash fixes into appropriate commits? If the fix is tricky or could be a common pitfall, you can add some comments in the code and/or the commit message (for example, https://github.com/yshui/picom/commit/ae0f82828e2ea6ccc47a6434871d041434e45193 seems to be interesting).

That is really needed.

@dccsillag great work after all.

Arian8j2 avatar Feb 03 '22 22:02 Arian8j2

Hello! Checking in on this for an update. How are things going - can we somehow help you? I'm looking forward to animated windows in Qtile!

philiparvidsson avatar Apr 25 '22 03:04 philiparvidsson

I never wanted animations anyway! 😊😁😂😭

philiparvidsson avatar May 17 '22 06:05 philiparvidsson

I'm also (im)patiently waiting for this to get merged :/ Really want to have fancy animated windows

zeGolem avatar May 18 '22 12:05 zeGolem

I'm terribly sorry for the disappearance. Unfortunately, I've been (and still am) extremely busy with personal matters, so I couldn't really tackle this work much. But I won't be abandoning it; I will continue working, though sporadically.

How are things going - can we somehow help you?

I'll give here a rough outline of the work that remains here (note that this is not static, I might have missed something considering I've been away for a while; also, the order is a little bit fuzzy, especially towards the end):

  • [x] https://github.com/dccsillag/picom/issues/28
  • [x] merge most of https://github.com/dccsillag/picom/pull/22
  • [ ] https://github.com/dccsillag/picom/issues/30 and https://github.com/dccsillag/picom/issues/31
  • [ ] https://github.com/dccsillag/picom/issues/27
  • [x] merge with next branch
  • [ ] clean up commit history
  • [ ] merge fading and animation code
  • [ ] implement @Arian8j2's work on top of this branch

As for helping -- I think I should be able to finish the second item (merging https://github.com/dccsillag/picom/pull/22) still today. Once that's done, PRs would be very welcome; especially for the fourth and third items (~~and possibly the seventh?~~).

Update: looks like the seventh item will be done together with the second.

dccsillag avatar May 29 '22 21:05 dccsillag

Any updates on this?

also, just out of curiosity, does this imply the animations from dccsillag and/or pijulius will be implemented or just the jonaburg ones?

beyond9thousand avatar Jun 30 '22 20:06 beyond9thousand

What will happen with the extra animations in pijulius?

Suyashtnt avatar Jul 12 '22 11:07 Suyashtnt

I think all we can do is patiently waiting for @dccsillag

yshui avatar Jul 14 '22 17:07 yshui

What will happen with the extra animations in pijulius?

@Suyashtnt workspace switch in/out animations.

beyond9thousand avatar Jul 14 '22 18:07 beyond9thousand

What will happen with the extra animations in pijulius?

@Suyashtnt workspace switch in/out animations.

Yeah I know what they are. I'm asking if they will be added

Suyashtnt avatar Jul 14 '22 18:07 Suyashtnt

What will happen with the extra animations in pijulius?

@Suyashtnt workspace switch in/out animations.

Yeah I know what they are. I'm asking if they will be added

Yes

beyond9thousand avatar Jul 21 '22 18:07 beyond9thousand

Imo this PR will finally sort out the picom forking problem.

AlexvZyl avatar Aug 01 '22 07:08 AlexvZyl

Imo this PR will finally sort out the picom forking problem.

Only issue is that we might never see this actually get merged :(

acama avatar Aug 04 '22 10:08 acama

Do not lose hope padawan @dccsillag is surely watching over us

beyond9thousand avatar Aug 04 '22 12:08 beyond9thousand

Do not lose hope padawan @dccsillag is surely watching over us

Indeed, I am :smile: In all seriousness, though, I hope to clock in some work on this next week.

Only issue is that we might never see this actually get merged :(

I honestly find that quite unlikely (but it may take a little while to get merged, unfortunately).

What will happen with the extra animations in pijulius?

The current plan is to implement them in a second PR -- i.e., this one will contain "only" the actual window transitions and all the backbone of the animation code. This is because workspace animations, as currently implemented in pijulius' fork, are inconsistent and have a significant memory leak, and solving these problems seemed highly nontrivial. By doing things like this, people will be able to enjoy animations without having to wait even more for all that.

dccsillag avatar Aug 04 '22 12:08 dccsillag

@dccsillag Is there a good reason for people willing to compile from source not to build from the branch of this pr and use as a daily driver?

colonelpanic8 avatar Aug 06 '22 20:08 colonelpanic8

@dccsillag Is there a good reason for people willing to compile from source not to build from the branch of this pr and use as a daily driver?

If any of the current issues affect you, then that would be a good reason. Other than that, nothing that comes to mind. In fact, I do this (though mainly for dogfooding), and I believe someone even made an AUR package.

dccsillag avatar Aug 06 '22 20:08 dccsillag

hey, hope you've been doing alright! have you had any luck so far? patiently waiting regardless :D

beyond9thousand avatar Sep 13 '22 13:09 beyond9thousand

Window animations seem to break severely on awesomeWM, does anybody know the cause of it?

Suyashtnt avatar Sep 13 '22 17:09 Suyashtnt

hey, hope you've been doing alright! have you had any luck so far? patiently waiting regardless :D

I'm afraid I've had no luck. I'm sorry for the inconvenience, but I've really had little to no time to work on this.

Window animations seem to break severely on awesomeWM, does anybody know the cause of it?

If it's not already in the issue tracker, then please open one, explaining what you mean by "break severely" (possibly with screenshots/screen recordings).

I recently happened to test this on a plain-ish AwesomeWM config and it worked flawlessly -- perhaps you have some configuration causing some conflict? (But please still report the issue.)

dccsillag avatar Sep 13 '22 18:09 dccsillag

@dccsillag Please don't feel pressured. This PR does not put food on your table. Do it in your time.

AlexvZyl avatar Sep 13 '22 20:09 AlexvZyl

I'm looking forward to it! I hope that my phobia of choice will be cured by the official version!

Borber avatar Sep 17 '22 16:09 Borber

Guys just send messages that have some relevance, this is a pull request not a chat room.

I also want this feature but this kind of thing just annoys developers...

joaopauloalbq avatar Sep 17 '22 17:09 joaopauloalbq

Just to add to @joaopauloalbq's comment above: There's no need to worry about me having forgotten about the work here or giving up on it. It's consistently in my personal TODO lists, and if anything is to change about my plans regarding this PR I will clearly say so here.

So let's try to leave this PR's discussion to messages regarding the actual code. (While I don't personally mind comments asking for updates all that much [as long as they are in moderation, as they have generally been], keep in mind that many other people are also subscribed to this PR, and such comments can be very noisy to them.)

dccsillag avatar Sep 18 '22 12:09 dccsillag

@dccsillag Could you please update this PR with "next" branch? I just wanted to take a look into this.

Monsterovich avatar Nov 21 '22 20:11 Monsterovich