Hyprland/src/Window.cpp

16 lines
1 KiB
C++
Raw Normal View History

2022-03-30 21:18:42 +02:00
#include "Window.hpp"
#include "Compositor.hpp"
2022-04-23 14:16:02 +02:00
CWindow::CWindow() {
m_vRealPosition.create(AVARTYPE_VECTOR, &g_pConfigManager->getConfigValuePtr("animations:windows_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:windows")->intValue, (void*)this);
m_vRealSize.create(AVARTYPE_VECTOR, &g_pConfigManager->getConfigValuePtr("animations:windows_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:windows")->intValue, (void*)this);
m_cRealBorderColor.create(AVARTYPE_COLOR, &g_pConfigManager->getConfigValuePtr("animations:borders_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:borders")->intValue, (void*)this);
m_fAlpha.create(AVARTYPE_FLOAT, &g_pConfigManager->getConfigValuePtr("animations:fadein_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:fadein")->intValue, (void*)this);
}
2022-03-30 21:18:42 +02:00
CWindow::~CWindow() {
2022-04-02 18:57:09 +02:00
if (g_pCompositor->isWindowActive(this)) {
2022-03-30 21:18:42 +02:00
g_pCompositor->m_pLastFocus = nullptr;
2022-04-02 18:57:09 +02:00
g_pCompositor->m_pLastWindow = nullptr;
}
2022-03-30 21:18:42 +02:00
}