mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
internal: handle setGroupCurrent properly on fs groups (#10920)
This commit is contained in:
@@ -1041,30 +1041,33 @@ void CWindow::setGroupCurrent(PHLWINDOW pWindow) {
|
|||||||
|
|
||||||
const auto CURRENTISFOCUS = PCURRENT == g_pCompositor->m_lastWindow.lock();
|
const auto CURRENTISFOCUS = PCURRENT == g_pCompositor->m_lastWindow.lock();
|
||||||
|
|
||||||
|
const auto PWINDOWSIZE = PCURRENT->m_realSize->goal();
|
||||||
|
const auto PWINDOWPOS = PCURRENT->m_realPosition->goal();
|
||||||
|
const auto PWINDOWLASTFLOATINGSIZE = PCURRENT->m_lastFloatingSize;
|
||||||
|
const auto PWINDOWLASTFLOATINGPOSITION = PCURRENT->m_lastFloatingPosition;
|
||||||
|
|
||||||
if (FULLSCREEN)
|
if (FULLSCREEN)
|
||||||
g_pCompositor->setWindowFullscreenInternal(PCURRENT, FSMODE_NONE);
|
g_pCompositor->setWindowFullscreenInternal(PCURRENT, FSMODE_NONE);
|
||||||
|
|
||||||
const auto PWINDOWSIZE = PCURRENT->m_realSize->goal();
|
|
||||||
const auto PWINDOWPOS = PCURRENT->m_realPosition->goal();
|
|
||||||
|
|
||||||
PCURRENT->setHidden(true);
|
PCURRENT->setHidden(true);
|
||||||
pWindow->setHidden(false); // can remove m_pLastWindow
|
pWindow->setHidden(false); // can remove m_pLastWindow
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->replaceWindowDataWith(PCURRENT, pWindow);
|
g_pLayoutManager->getCurrentLayout()->replaceWindowDataWith(PCURRENT, pWindow);
|
||||||
|
|
||||||
if (PCURRENT->m_isFloating) {
|
pWindow->m_realPosition->setValueAndWarp(PWINDOWPOS);
|
||||||
pWindow->m_realPosition->setValueAndWarp(PWINDOWPOS);
|
pWindow->m_realSize->setValueAndWarp(PWINDOWSIZE);
|
||||||
pWindow->m_realSize->setValueAndWarp(PWINDOWSIZE);
|
|
||||||
}
|
if (FULLSCREEN)
|
||||||
|
g_pCompositor->setWindowFullscreenInternal(pWindow, MODE);
|
||||||
|
|
||||||
|
pWindow->m_lastFloatingSize = PWINDOWLASTFLOATINGSIZE;
|
||||||
|
pWindow->m_lastFloatingPosition = PWINDOWLASTFLOATINGPOSITION;
|
||||||
|
|
||||||
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
|
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
|
||||||
|
|
||||||
if (CURRENTISFOCUS)
|
if (CURRENTISFOCUS)
|
||||||
g_pCompositor->focusWindow(pWindow);
|
g_pCompositor->focusWindow(pWindow);
|
||||||
|
|
||||||
if (FULLSCREEN)
|
|
||||||
g_pCompositor->setWindowFullscreenInternal(pWindow, MODE);
|
|
||||||
|
|
||||||
g_pHyprRenderer->damageWindow(pWindow);
|
g_pHyprRenderer->damageWindow(pWindow);
|
||||||
|
|
||||||
pWindow->updateWindowDecos();
|
pWindow->updateWindowDecos();
|
||||||
|
Reference in New Issue
Block a user