mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 05:49:48 +01:00
fix workspaces disappearing on switch anim mode
This commit is contained in:
parent
fcd56a3701
commit
ba573a529a
1 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,8 @@ void CWorkspace::startAnim(bool in, bool left) {
|
||||||
const auto ANIMSTYLE = g_pConfigManager->getString("animations:workspaces_style");
|
const auto ANIMSTYLE = g_pConfigManager->getString("animations:workspaces_style");
|
||||||
|
|
||||||
if (ANIMSTYLE == "fade") {
|
if (ANIMSTYLE == "fade") {
|
||||||
|
m_vRenderOffset.setValueAndWarp(Vector2D(0, 0)); // fix a bug, if switching from slide -> fade.
|
||||||
|
|
||||||
if (in) {
|
if (in) {
|
||||||
m_fAlpha.setValueAndWarp(0.f);
|
m_fAlpha.setValueAndWarp(0.f);
|
||||||
m_fAlpha = 255.f;
|
m_fAlpha = 255.f;
|
||||||
|
@ -53,6 +55,8 @@ void CWorkspace::startAnim(bool in, bool left) {
|
||||||
// fallback is slide
|
// fallback is slide
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID);
|
||||||
|
|
||||||
|
m_fAlpha.setValueAndWarp(255.f); // fix a bug, if switching from fade -> slide.
|
||||||
|
|
||||||
if (in) {
|
if (in) {
|
||||||
m_vRenderOffset.setValueAndWarp(Vector2D(left ? PMONITOR->vecSize.x : -PMONITOR->vecSize.x, 0));
|
m_vRenderOffset.setValueAndWarp(Vector2D(left ? PMONITOR->vecSize.x : -PMONITOR->vecSize.x, 0));
|
||||||
m_vRenderOffset = Vector2D(0, 0);
|
m_vRenderOffset = Vector2D(0, 0);
|
||||||
|
|
Loading…
Reference in a new issue