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

Added Desktop Switch Triggers for different animations #1262

Closed
wants to merge 24 commits into from

Commits on May 16, 2024

  1. transition: add step and cubic bezier interpolator

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 16, 2024
    Configuration menu
    Copy the full SHA
    61507b5 View commit details
    Browse the repository at this point in the history
  2. transition: parse curve from string

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 16, 2024
    Configuration menu
    Copy the full SHA
    614ebbb View commit details
    Browse the repository at this point in the history
  3. Add animation script

    Allow the definition of customizable animations using expressions and
    transition curves.
    
    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 16, 2024
    Configuration menu
    Copy the full SHA
    0f82266 View commit details
    Browse the repository at this point in the history
  4. config_libconfig: parse animation scripts

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 16, 2024
    Configuration menu
    Copy the full SHA
    e12e102 View commit details
    Browse the repository at this point in the history
  5. config_libconfig: generate animation for legacy fading options

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 16, 2024
    Configuration menu
    Copy the full SHA
    2f9e092 View commit details
    Browse the repository at this point in the history
  6. core: catch up with the X server always

    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 <[email protected]>
    yshui committed May 16, 2024
    Configuration menu
    Copy the full SHA
    6140ae8 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2024

  1. win: switch to use the new animation system

    Remove the old fading machinary. As a side-effect, animation and time
    based shaders are now unified.
    
    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    49670be View commit details
    Browse the repository at this point in the history
  2. win: make window and shadow offsets animatable

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    39a9a71 View commit details
    Browse the repository at this point in the history
  3. transition: remove unused functions

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    1e32ced View commit details
    Browse the repository at this point in the history
  4. core: remove fade_timer from session

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    05e5f48 View commit details
    Browse the repository at this point in the history
  5. tests: add animations to base config parsing test

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    b7becd9 View commit details
    Browse the repository at this point in the history
  6. options: disable animations on legacy backends

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    69835cb View commit details
    Browse the repository at this point in the history
  7. backend: add scale to blit parameters

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    a2525fb View commit details
    Browse the repository at this point in the history
  8. backend: gl: support the scale parameter of blit

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    d894e90 View commit details
    Browse the repository at this point in the history
  9. config: add debug option "consistent_buffer_age"

    An attempt to make rendering with damage deterministic even when
    replayed from a trace.
    
    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    a0b5d06 View commit details
    Browse the repository at this point in the history
  10. types: introduce a type to represent a simple rectangle

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    be82ec0 View commit details
    Browse the repository at this point in the history
  11. win: make window and shadow scales animatable

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    659f009 View commit details
    Browse the repository at this point in the history
  12. types: add a scoped region_t

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    cf98d95 View commit details
    Browse the repository at this point in the history
  13. win: support animatable cropping

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    811681a View commit details
    Browse the repository at this point in the history
  14. backend/xrender: implement support for scale

    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    bf6fc47 View commit details
    Browse the repository at this point in the history
  15. win: add animation suppressions setting

    This can be used to prevent another animation from interrupting the
    current running animation.
    
    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 18, 2024
    Configuration menu
    Copy the full SHA
    2899c78 View commit details
    Browse the repository at this point in the history
  16. Added Desktop Switch Triggers for different animations

    This adds support for desktop switching animations by keeping track of _NET_CURRENT_DESKTOP atom on the root window. 
    
    As far as I understand this atom is set by window managers and so if it changes we can know that it's a desktop switch happening. Unfortunately window manager may need to set this BEFORE hiding/showing windows so we can animate correctly, me personally using FluxBox and this quick change pijulius/fluxbox@83ee4db  makes it work just fine.
    
    It adds the following animation triggers:
    * workspace-out
    * workspace-out-inverse
    * workspace-in
    * workspace-in-inverse
    
    Unfortunately had to add inverse variables too as you may navigate to the next workspace from for e.g. 1st to 2nd but you may also go to 2nd from 1st and in that case the animations have to be totally different.
    
    Here is a config example for switching workspace:
    
    animations = ({
        triggers = ["workspace-out"];
        offset-y = {
            timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
            start = "0";
            end = "-window-height";
        };
        shadow-offset-y = "offset-y";
        opacity = {
            timing = "0.2s linear";
            start = "window-raw-opacity-before";
            end = "window-raw-opacity";
        };
        blur-opacity = "opacity";
        shadow-opacity = "opacity";
    },
    {
        triggers = ["workspace-out-inverse"];
        offset-y = {
            timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
            start = "0";
            end = "window-height + window-y";
        };
        shadow-offset-y = "offset-y";
        opacity = {
            timing = "0.2s linear";
            start = "window-raw-opacity-before";
            end = "window-raw-opacity";
        };
        blur-opacity = "opacity";
        shadow-opacity = "opacity";
    },
    {
        triggers = ["workspace-in"];
        offset-y = {
            timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
            start = "window-height + window-y";
            end = "0";
        };
        shadow-offset-y = "offset-y";
        opacity = {
            timing = "0.2s linear";
            start = "0";
            end = "window-raw-opacity";
        };
        blur-opacity = "opacity";
        shadow-opacity = "opacity";
    },
    {
        triggers = ["workspace-in-inverse"];
        offset-y = {
            timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
            start = "-window-height";
            end = "0";
        };
        shadow-offset-y = "offset-y";
        opacity = {
            timing = "0.2s linear";
            start = "0";
            end = "window-raw-opacity";
        };
        blur-opacity = "opacity";
        shadow-opacity = "opacity";
    })
    pijulius committed May 18, 2024
    Configuration menu
    Copy the full SHA
    df6ccb5 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2024

  1. win: expose information about monitors to animation script

    Define script context variables describing the monitor a window is on.
    
    Signed-off-by: Yuxuan Shui <[email protected]>
    yshui committed May 19, 2024
    Configuration menu
    Copy the full SHA
    6624f09 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a092060 View commit details
    Browse the repository at this point in the history