aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-18 12:39:20 +0200
committervaxerski <[email protected]>2022-05-18 12:39:20 +0200
commitba573a529afdbf368aa632cf70b41c9a0595578b (patch)
treec3926442f0064c06be459f2f24aef609f8f4bfa5 /src/helpers
parentfcd56a37017fa69f3b433d80a2c793518e429092 (diff)
downloadHyprland-ba573a529afdbf368aa632cf70b41c9a0595578b.tar.gz
Hyprland-ba573a529afdbf368aa632cf70b41c9a0595578b.zip
fix workspaces disappearing on switch anim mode
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Workspace.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp
index 16037fb6..5341fdf7 100644
--- a/src/helpers/Workspace.cpp
+++ b/src/helpers/Workspace.cpp
@@ -42,6 +42,8 @@ void CWorkspace::startAnim(bool in, bool left) {
const auto ANIMSTYLE = g_pConfigManager->getString("animations:workspaces_style");
if (ANIMSTYLE == "fade") {
+ m_vRenderOffset.setValueAndWarp(Vector2D(0, 0)); // fix a bug, if switching from slide -> fade.
+
if (in) {
m_fAlpha.setValueAndWarp(0.f);
m_fAlpha = 255.f;
@@ -52,7 +54,9 @@ void CWorkspace::startAnim(bool in, bool left) {
} else {
// fallback is slide
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID);
-
+
+ m_fAlpha.setValueAndWarp(255.f); // fix a bug, if switching from fade -> slide.
+
if (in) {
m_vRenderOffset.setValueAndWarp(Vector2D(left ? PMONITOR->vecSize.x : -PMONITOR->vecSize.x, 0));
m_vRenderOffset = Vector2D(0, 0);