-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Animation: part 2 #1253
Animation: part 2 #1253
Conversation
caee428
to
7010c8c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #1253 +/- ##
==========================================
+ Coverage 41.03% 44.19% +3.15%
==========================================
Files 59 60 +1
Lines 12277 13256 +979
==========================================
+ Hits 5038 5858 +820
- Misses 7239 7398 +159
|
54ee997
to
958a64f
Compare
2dcc5df
to
f4b24d3
Compare
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
We should always process all the X events in libxcb's queue with the server grabbed, not just when we have `pending_updates` flag set. This is the only way to make sure we always render with up-to-date server states. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Remove the old fading machinary. As a side-effect, animation and time based shaders are now unified. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
An attempt to make rendering with damage deterministic even when replayed from a trace. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This can be used to prevent another animation from interrupting the current running animation. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Define script context variables describing the monitor a window is on. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Alright, let's merge this! |
im not sure if i did something wrong, i dont compile usually. this is the current next branch this was my approach of compiling
i use endeavourOS and openbox thanks for your work btw <3 looking forward to the animations |
@DarioDarko can you provide your config file? |
i have this issue as well. commenting out the animation sections doesn't solve it. System info
Picom config |
@enderprism hmm, i can't reproduce it. do you mind open an issue? please include a @DarioDarko can you do the same as well? thanks. |
i opened the issue FIXED :) works now! |
What
This PR adds a scripting system that supports simple easing curves, and simple arithmetic. And a animation system based on scripts.
This PR also adds a shim to support old fading configs on top of this new animation system.
Why
Originally my plan was to implement animations on top of just easing curves, but I slowly realized that this is not flexible enough. Suppose I want to have windows fly out when closed, how do I define the end point of the animation curve? It's not straightforward, because to move the window completely off-screen, the end Y coordinate will depend on the height of the window.
Sure, I can have some predefined values, like "upwards-off-screen", to mean a Y coordinate that will move the window off the top edge of the screen. But it's impossible to anticipate what kind of animation users might want. So I thought, we might as well to go for maximal customizability.
So for this example, you would write a script like this:
Showcase
a.mp4
TODO
1. Presets
Although you can define all kinds of animations with this system, I do understand not everybody would want to learn how to use this, if all they want is just some simple animations. The plan is to add a "preset" system, so users can config simple animations, like "fly-out", "fade-out", etc., without needing to write these scripts.
2. Bugs
There are still many bugs to be crushed here.
3. Documentation
We need to explain how the script works. Explain what's the syntax for curves, for simple arithmetic expressions. And warn users about common pitfall (e.g. you need to explicit set
opacity = 1;
, otherwise your window disappears).