Fadein/out now applies to layersurfaces too
This commit is contained in:
parent
694f4433a2
commit
109136af97
11 changed files with 153 additions and 15 deletions
|
|
@ -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;
|
||||
};
|
||||
7
src/helpers/WLClasses.cpp
Normal file
7
src/helpers/WLClasses.cpp
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue