mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 04:49:48 +01:00
groups: fix fullscreen behavior with groups
This commit is contained in:
parent
0ad2d9f0b5
commit
253286669a
1 changed files with 9 additions and 1 deletions
|
@ -559,12 +559,17 @@ void CWindow::setGroupCurrent(CWindow* pWindow) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto PCURRENT = getGroupCurrent();
|
const auto PCURRENT = getGroupCurrent();
|
||||||
|
const bool FULLSCREEN = PCURRENT->m_bIsFullscreen;
|
||||||
|
const auto WORKSPACE = g_pCompositor->getWorkspaceByID(PCURRENT->m_iWorkspaceID);
|
||||||
|
|
||||||
const auto PWINDOWSIZE = PCURRENT->m_vRealSize.goalv();
|
const auto PWINDOWSIZE = PCURRENT->m_vRealSize.goalv();
|
||||||
const auto PWINDOWPOS = PCURRENT->m_vRealPosition.goalv();
|
const auto PWINDOWPOS = PCURRENT->m_vRealPosition.goalv();
|
||||||
|
|
||||||
const auto CURRENTISFOCUS = PCURRENT == g_pCompositor->m_pLastWindow;
|
const auto CURRENTISFOCUS = PCURRENT == g_pCompositor->m_pLastWindow;
|
||||||
|
|
||||||
|
if (FULLSCREEN)
|
||||||
|
g_pCompositor->setWindowFullscreen(PCURRENT, false, WORKSPACE->m_efFullscreenMode);
|
||||||
|
|
||||||
PCURRENT->setHidden(true);
|
PCURRENT->setHidden(true);
|
||||||
pWindow->setHidden(false);
|
pWindow->setHidden(false);
|
||||||
|
|
||||||
|
@ -579,6 +584,9 @@ void CWindow::setGroupCurrent(CWindow* pWindow) {
|
||||||
|
|
||||||
if (CURRENTISFOCUS)
|
if (CURRENTISFOCUS)
|
||||||
g_pCompositor->focusWindow(pWindow);
|
g_pCompositor->focusWindow(pWindow);
|
||||||
|
|
||||||
|
if (FULLSCREEN)
|
||||||
|
g_pCompositor->setWindowFullscreen(pWindow, true, WORKSPACE->m_efFullscreenMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindow::insertWindowToGroup(CWindow* pWindow) {
|
void CWindow::insertWindowToGroup(CWindow* pWindow) {
|
||||||
|
|
Loading…
Reference in a new issue