diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-08-25 18:05:08 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-08-25 18:05:08 +0200 |
| commit | 870471dd96724474869d2e648b623c17df12fb57 (patch) | |
| tree | 62b34b8586bb14dab6f64991edf9969cff885caa /src/helpers/Workspace.cpp | |
| parent | 23e17700a73324e7e0a5bccb96e426bbb99efe7b (diff) | |
internal: allow opening empty special workspaces
Fixes point 2 of #2596
Diffstat (limited to 'src/helpers/Workspace.cpp')
| -rw-r--r-- | src/helpers/Workspace.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp index eddd2143..09149ec8 100644 --- a/src/helpers/Workspace.cpp +++ b/src/helpers/Workspace.cpp @@ -66,9 +66,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { try { auto percstr = ANIMSTYLE.substr(ANIMSTYLE.find_last_of(' ') + 1); movePerc = std::stoi(percstr.substr(0, percstr.length() - 1)); - } catch (std::exception& e) { - Debug::log(ERR, "Error in startAnim: invalid percentage"); - } + } catch (std::exception& e) { Debug::log(ERR, "Error in startAnim: invalid percentage"); } } m_fAlpha.setValueAndWarp(1.f); @@ -133,6 +131,17 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { } } + if (m_bIsSpecialWorkspace) { + // required for open/close animations + if (in) { + m_fAlpha.setValueAndWarp(0.f); + m_fAlpha = 1.f; + } else { + m_fAlpha.setValueAndWarp(1.f); + m_fAlpha = 0.f; + } + } + if (instant) { m_vRenderOffset.warp(); m_fAlpha.warp(); |
