-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add style transition API #539
base: master
Are you sure you want to change the base?
Conversation
I guess an obvious question is, what about Wayland? Do we get window IDs like this once we move away from X? I think we should also think about the abuse perspective. I'm not sure it's a good idea to have the API endpoint be the same for an app to request the transition of any window it can guess the ID of and for the whole desktop to be affected when no argument is supplied. An App should probably only be able to effect itself |
|
@danrabbit updated. |
Does this need to be an external API at all? Can't Gala just listen to the setting and do this transition automatically? Edit: I guess the use of an API is that each app could request this whenever, i.e. Code could request it when changing its style? |
@cassidyjames yeah that and if gala listened to that setting you have to account for the fact that the signal could fire later than the theme change, causing a jarring flick before the actual transition. That's why it's safer to have the app call before actually changing the setting. If we had a Gtk fork / patch then perhaps that would be possible to do automatically. |
Branch updated to use the newest Cogl2 API and updated to master. |
…ments * Fix comments alignment
Ready for review again. |
Hm, I can't really see that this smooths anything out for me. Is there something I need to do other than install this branch and restart my session? |
@danrabbit hm, that's weird. Installing the branch & restarting should be enough. Is the transition like instant, or do you see at least some trace of the animation? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice there was a PR open with this functionality, definitely something really cool to have!
It's most likely something related to my set up, but I'm seeing some noise in the panel and shadows:
Adds a new method to the DBus API called
transition_from_snapshot
for apps (and primarily the switchboard plug) to be able to create a smooth stylesheet transition. The transition will not happen when animations are disabled but the snapshot will still be created and added (that is it will stay for 200ms and hide without any animations).The code should be quite optimized for the task, I previously used a simple
Cogl.Texture.get_data
for creating a static texture but it turned out to be quite long to execute: transferring pixel data from GPU to CPU took ~15ms on my machine which is little bit above 60FPS but there were longer runs that caused visible lag when creating textures for maximized windows. We now copy the texture directly on the GPU which takes about ~2ms.Update: the code has been updated to Cogl2 and to automatically transition when the style changes, however there still seems to be the problem of some elements flickering while transitioning. I think this is a matter of timing things correctly.