mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-01 20:25:59 +01:00
added a noanim rule
This commit is contained in:
parent
095688712d
commit
190ddb5697
4 changed files with 8 additions and 2 deletions
|
@ -23,6 +23,7 @@ struct SWindowAdditionalConfigData {
|
||||||
bool forceNoBlur = false;
|
bool forceNoBlur = false;
|
||||||
bool forceOpaque = false;
|
bool forceOpaque = false;
|
||||||
bool forceAllowsInput = false;
|
bool forceAllowsInput = false;
|
||||||
|
bool forceNoAnims = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CWindow {
|
class CWindow {
|
||||||
|
|
|
@ -721,6 +721,7 @@ bool windowRuleValid(const std::string& RULE) {
|
||||||
&& RULE != "forceinput"
|
&& RULE != "forceinput"
|
||||||
&& RULE != "fullscreen"
|
&& RULE != "fullscreen"
|
||||||
&& RULE != "pin"
|
&& RULE != "pin"
|
||||||
|
&& RULE != "noanim"
|
||||||
&& RULE.find("animation") != 0
|
&& RULE.find("animation") != 0
|
||||||
&& RULE.find("rounding") != 0
|
&& RULE.find("rounding") != 0
|
||||||
&& RULE.find("workspace") != 0);
|
&& RULE.find("workspace") != 0);
|
||||||
|
|
|
@ -166,6 +166,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
PWINDOW->m_sAdditionalConfigData.forceAllowsInput = true;
|
PWINDOW->m_sAdditionalConfigData.forceAllowsInput = true;
|
||||||
} else if (r.szRule == "pin") {
|
} else if (r.szRule == "pin") {
|
||||||
PWINDOW->m_bPinned = true;
|
PWINDOW->m_bPinned = true;
|
||||||
|
} else if (r.szRule == "noanim") {
|
||||||
|
PWINDOW->m_sAdditionalConfigData.forceNoAnims = true;
|
||||||
} else if (r.szRule.find("rounding") == 0) {
|
} else if (r.szRule.find("rounding") == 0) {
|
||||||
try {
|
try {
|
||||||
PWINDOW->m_sAdditionalConfigData.rounding = std::stoi(r.szRule.substr(r.szRule.find_first_of(' ') + 1));
|
PWINDOW->m_sAdditionalConfigData.rounding = std::stoi(r.szRule.substr(r.szRule.find_first_of(' ') + 1));
|
||||||
|
|
|
@ -21,12 +21,12 @@ void CAnimationManager::addBezierWithName(std::string name, const Vector2D& p1,
|
||||||
|
|
||||||
void CAnimationManager::tick() {
|
void CAnimationManager::tick() {
|
||||||
|
|
||||||
bool animationsDisabled = false;
|
bool animGlobalDisabled = false;
|
||||||
|
|
||||||
static auto *const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
|
static auto *const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
|
||||||
|
|
||||||
if (!*PANIMENABLED)
|
if (!*PANIMENABLED)
|
||||||
animationsDisabled = true;
|
animGlobalDisabled = true;
|
||||||
|
|
||||||
static auto *const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
|
static auto *const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
|
||||||
static auto *const PSHADOWSENABLED = &g_pConfigManager->getConfigValuePtr("decoration:drop_shadow")->intValue;
|
static auto *const PSHADOWSENABLED = &g_pConfigManager->getConfigValuePtr("decoration:drop_shadow")->intValue;
|
||||||
|
@ -56,11 +56,13 @@ void CAnimationManager::tick() {
|
||||||
const auto PWORKSPACE = (CWorkspace*)av->m_pWorkspace;
|
const auto PWORKSPACE = (CWorkspace*)av->m_pWorkspace;
|
||||||
const auto PLAYER = (SLayerSurface*)av->m_pLayer;
|
const auto PLAYER = (SLayerSurface*)av->m_pLayer;
|
||||||
CMonitor* PMONITOR = nullptr;
|
CMonitor* PMONITOR = nullptr;
|
||||||
|
bool animationsDisabled = animGlobalDisabled;
|
||||||
|
|
||||||
wlr_box WLRBOXPREV = {0,0,0,0};
|
wlr_box WLRBOXPREV = {0,0,0,0};
|
||||||
if (PWINDOW) {
|
if (PWINDOW) {
|
||||||
WLRBOXPREV = PWINDOW->getFullWindowBoundingBox();
|
WLRBOXPREV = PWINDOW->getFullWindowBoundingBox();
|
||||||
PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
||||||
|
animationsDisabled = animationsDisabled || PWINDOW->m_sAdditionalConfigData.forceNoAnims;
|
||||||
} else if (PWORKSPACE) {
|
} else if (PWORKSPACE) {
|
||||||
PMONITOR = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
|
PMONITOR = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
|
||||||
WLRBOXPREV = {(int)PMONITOR->vecPosition.x, (int)PMONITOR->vecPosition.y, (int)PMONITOR->vecSize.x, (int)PMONITOR->vecSize.y};
|
WLRBOXPREV = {(int)PMONITOR->vecPosition.x, (int)PMONITOR->vecPosition.y, (int)PMONITOR->vecSize.x, (int)PMONITOR->vecSize.y};
|
||||||
|
|
Loading…
Reference in a new issue