mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 09:25:59 +01:00
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
This commit is contained in:
parent
a551f85b91
commit
8fa4cfb7df
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue