aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-31 17:56:33 +0200
committervaxerski <[email protected]>2022-05-31 17:56:33 +0200
commit3e28a8b6907eb3297dd4751ddcd13609c7a74f5b (patch)
treed65a7cbe1c9c844f6f79fd1663c1c253cb95adbc
parent8de7cc5a8da13973b347d5da96de89efc3dbdbaf (diff)
downloadHyprland-3e28a8b6907eb3297dd4751ddcd13609c7a74f5b.tar.gz
Hyprland-3e28a8b6907eb3297dd4751ddcd13609c7a74f5b.zip
added slidevert for workspaces
-rw-r--r--src/helpers/Workspace.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp
index 215ac373..51429261 100644
--- a/src/helpers/Workspace.cpp
+++ b/src/helpers/Workspace.cpp
@@ -57,6 +57,18 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) {
m_fAlpha.setValueAndWarp(255.f);
m_fAlpha = 0.f;
}
+ } else if ("slidevert") {
+ // 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(0, left ? PMONITOR->vecSize.y : -PMONITOR->vecSize.y));
+ m_vRenderOffset = Vector2D(0, 0);
+ } else {
+ m_vRenderOffset = Vector2D(0, left ? -PMONITOR->vecSize.y : PMONITOR->vecSize.y);
+ }
} else {
// fallback is slide
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID);