diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-11-11 13:55:32 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-11-11 13:55:37 +0000 |
| commit | 8fa4cfb7dfa0be52a66db5f3b13e0ecde3d78b41 (patch) | |
| tree | 703b1fef83447cd9265da1c2c8989bfd84ccf00f /src/managers/KeybindManager.cpp | |
| parent | a551f85b9129eac76a5f295ecfe4fb39f96f435c (diff) | |
keybinds: don't animate fullscreen size/pos changes coming in
when fullscreen, don't animate the pos/size when switching to another fullscreen window, as they can look weird and distracting.
Ideally we would do it differently but it's not really possible to do well without reading minds
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 5be6a1d9..f2fdab53 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -338,6 +338,10 @@ void CKeybindManager::switchToWindow(PHLWINDOW PWINDOWTOCHANGETO) { if (!PWINDOWTOCHANGETO->m_bPinned) g_pCompositor->setWindowFullscreenInternal(PWINDOWTOCHANGETO, MODE); + + // warp the position + size animation, otherwise it looks weird. + PWINDOWTOCHANGETO->m_vRealPosition.warp(); + PWINDOWTOCHANGETO->m_vRealSize.warp(); } else { updateRelativeCursorCoords(); g_pCompositor->focusWindow(PWINDOWTOCHANGETO); @@ -2110,6 +2114,10 @@ SDispatchResult CKeybindManager::focusWindow(std::string regexp) { if (FSWINDOW != PWINDOW && !PWINDOW->m_bPinned) g_pCompositor->setWindowFullscreenClient(PWINDOW, FSMODE); + + // warp the position + size animation, otherwise it looks weird. + PWINDOW->m_vRealPosition.warp(); + PWINDOW->m_vRealSize.warp(); } } else g_pCompositor->focusWindow(PWINDOW); |
