From 4bc669f9331bb66ab30bd705d09f1239bc3e83ed Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 28 Feb 2024 15:00:34 +0000 Subject: layers: add fully featured animations Adds configs and layerrules to handle them alas fixes #981 I have cooked --- src/helpers/WLClasses.hpp | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'src/helpers/WLClasses.hpp') diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index 6cc9b5d5..b62a6489 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -19,6 +19,11 @@ struct SLayerSurface { ~SLayerSurface(); void applyRules(); + void startAnimation(bool in, bool instant = false); + bool isFadedOut(); + + CAnimatedVariable realPosition; + CAnimatedVariable realSize; wlr_layer_surface_v1* layerSurface; wl_list link; @@ -34,26 +39,28 @@ struct SLayerSurface { DYNLISTENER(commitLayerSurface); DYNLISTENER(newPopup); - CBox geometry = {0, 0, 0, 0}; - Vector2D position; - zwlr_layer_shell_v1_layer layer; + CBox geometry = {0, 0, 0, 0}; + Vector2D position; + zwlr_layer_shell_v1_layer layer; + + bool mapped = false; - bool mapped = false; + int monitorID = -1; - int monitorID = -1; + std::string szNamespace = ""; - std::string szNamespace = ""; + CAnimatedVariable alpha; + bool fadingOut = false; + bool readyToDelete = false; + bool noProcess = false; + bool noAnimations = false; - CAnimatedVariable alpha; - bool fadingOut = false; - bool readyToDelete = false; - bool noProcess = false; - bool noAnimations = false; + bool forceBlur = false; + int xray = -1; + bool ignoreAlpha = false; + float ignoreAlphaValue = 0.f; - bool forceBlur = false; - int xray = -1; - bool ignoreAlpha = false; - float ignoreAlphaValue = 0.f; + std::optional animationStyle; // For the list lookup bool operator==(const SLayerSurface& rhs) const { -- cgit v1.2.3