Picom: Animation support

Created on 5 Aug 2019  路  14Comments  路  Source: yshui/picom

BlackCapCoder's Compton fork has support for some simple animations.

Would it be possible to add something like this into this fork of compton?
BlackCapCoder's fork is hacky and should be written cleaner if so.

demo: https://www.youtube.com/watch?v=eKwPkiACqF0&feature=youtu.be

feature out of scope

Most helpful comment

I have been working on a little proof of concept today to see if this is something that could work in picom, and this is the result:
encoded

I have only little c experience, and basically know nothing about how picom works, but that's what i could get after about a day of reading the code and testing stuff.

There are still some bugs and i need more time to get comfortable with everything picom is doing. Might PR in a few weeks once i feel comfortable enough with the quality and functionality.

All 14 comments

I will not actively implement this feature myself, since I think it's out of the scope of compton. but pull requests are welcome if someone want to give this a go.

I have been working on a little proof of concept today to see if this is something that could work in picom, and this is the result:
encoded

I have only little c experience, and basically know nothing about how picom works, but that's what i could get after about a day of reading the code and testing stuff.

There are still some bugs and i need more time to get comfortable with everything picom is doing. Might PR in a few weeks once i feel comfortable enough with the quality and functionality.

I'm having an issue when a window shrinks or grows. When one of both happens, it seems like the content of the window is drawing in the new final size instantly. And i can't get the content to scale properly while the transition is running.

@yshui can you maybe give me a clue on how to force windows to redraw their content (during a transition).

I have been working on a little proof of concept today to see if this is something that could work in picom, and this is the result:
encoded

I have only little c experience, and basically know nothing about how picom works, but that's what i could get after about a day of reading the code and testing stuff.

There are still some bugs and i need more time to get comfortable with everything picom is doing. Might PR in a few weeks once i feel comfortable enough with the quality and functionality.

Good Job!

I'm having an issue when a window shrinks or grows. When one of both happens, it seems like the content of the window is drawing in the new final size instantly. And i can't get the content to scale properly while the transition is running.

@yshui can you maybe give me a clue on how to force windows to redraw their content (during a transition).

I doubt that it's necessary to have windows redraw during the transition. I have a look at the transition of KDE. It seems that windows just crossfade between two image.

Even though it might not be necessary for quick transitions, i would still like to be able to re-render the content during the transition. For the beginning i would like this to happen as often as possible, and later on things like this could be changed with configuration.

For slow transitions, it looks pretty bad if a window goes from very large to very small or vice versa.
I have tried sending a xcb configure window event to set sizes during transition, but this doesn't seem to work either. Still have to do more read-up to figure out how this is properly handled. (or someone could tell me how this works)

Unfortunately it's pretty much impossible to have window contents update smoothly during transition.

From the window's perspective, it's size change request is already acknowledged by the window manager, it's window is already updated to the new size, so it will render content at the new size. The compositor doesn't have a say in this process.

@yshui so the only alternative we have is to grab the pixmap from before the size update, the one after, and transition in between them?

edit: i have no idea how to do that btw. but i'm sure i can figure it out

@phisch ideally, yes.

simple transition is probably enough, like scaling up the before pixmap for example.

@phisch Any updates on this? I will gladly help with testing, looks amazing so far.

@phisch Same here . I will be more than happy to test it .And I bet loads of people would come up as they are stuck in their home due to COVID19.

@phisch would you happen to have a cloned repo on your page with your modifications? Seems several of us would love to hack along

waiting for @phisch might take us forever :) in the meanwhile here's blackcapcoder's compton animation code patched into picom (with only a few adjustments). https://www.youtube.com/watch?v=CqAGhSR3ZtA&feature=youtu.be you can play with it for yourselves at https://github.com/jonaburg/picom

Hi @phisch any news on this one ? really waiting for an update on this.

@phisch Could you share your code of your proof of concept? This would be great, so work can continue work on this feature.
Does anyone want to make animations for the pixmap during the window size animation?

Was this page helpful?
0 / 5 - 0 ratings