aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-14 17:23:46 +0200
committervaxerski <[email protected]>2022-05-14 17:23:46 +0200
commit109136af97547f35f767dae2e7908ab218dfea11 (patch)
tree806d931d2a3d7d04a9a5faecfcf46d5470f1633f /src/helpers
parent694f4433a2b6083cef5a4f43e974f9c70b9857af (diff)
downloadHyprland-109136af97547f35f767dae2e7908ab218dfea11.tar.gz
Hyprland-109136af97547f35f767dae2e7908ab218dfea11.zip
Fadein/out now applies to layersurfaces too
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/AnimatedVariable.hpp6
-rw-r--r--src/helpers/WLClasses.cpp7
-rw-r--r--src/helpers/WLClasses.hpp6
3 files changed, 19 insertions, 0 deletions
diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp
index a484958b..0b31b5c5 100644
--- a/src/helpers/AnimatedVariable.hpp
+++ b/src/helpers/AnimatedVariable.hpp
@@ -18,6 +18,7 @@ enum AVARDAMAGEPOLICY {
class CAnimationManager;
class CWorkspace;
+struct SLayerSurface;
class CAnimatedVariable {
public:
@@ -183,8 +184,12 @@ private:
float* m_pSpeed = nullptr;
int64_t* m_pEnabled = nullptr;
+
+ // owners
void* m_pWindow = nullptr;
void* m_pWorkspace = nullptr;
+ void* m_pLayer = nullptr;
+
std::string* m_pBezier = nullptr;
bool m_bDummy = true;
@@ -196,4 +201,5 @@ private:
friend class CAnimationManager;
friend class CWorkspace;
+ friend struct SLayerSurface;
}; \ No newline at end of file
diff --git a/src/helpers/WLClasses.cpp b/src/helpers/WLClasses.cpp
new file mode 100644
index 00000000..82e41b4f
--- /dev/null
+++ b/src/helpers/WLClasses.cpp
@@ -0,0 +1,7 @@
+#include "WLClasses.hpp"
+#include "../config/ConfigManager.hpp"
+
+SLayerSurface::SLayerSurface() {
+ alpha.create(AVARTYPE_FLOAT, &g_pConfigManager->getConfigValuePtr("animations:fadein_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:fadein")->intValue, &g_pConfigManager->getConfigValuePtr("animations:fadein_curve")->strValue, nullptr, AVARDAMAGE_ENTIRE);
+ alpha.m_pLayer = this;
+} \ No newline at end of file
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 544498f5..9d1cd6df 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -5,8 +5,11 @@
#include "../../wlr-layer-shell-unstable-v1-protocol.h"
#include "../Window.hpp"
#include "SubsurfaceTree.hpp"
+#include "AnimatedVariable.hpp"
struct SLayerSurface {
+ SLayerSurface();
+
wlr_layer_surface_v1* layerSurface;
wl_list link;
@@ -22,6 +25,9 @@ struct SLayerSurface {
int monitorID = -1;
+ CAnimatedVariable alpha;
+ bool fadingOut = false;
+ bool readyToDelete = false;
// For the list lookup
bool operator==(const SLayerSurface& rhs) {