mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 15:45:57 +01:00
toplevel: patches group toplevel-activated (#2931)
* patches group toplevel-activated modified: src/Compositor.cpp modified: src/Window.cpp * remove redundant call modified: src/Compositor.cpp * fix style modified: src/Compositor.cpp
This commit is contained in:
parent
126792584f
commit
c4c3b590e5
2 changed files with 11 additions and 1 deletions
|
@ -924,6 +924,16 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(pWindow);
|
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(pWindow);
|
||||||
|
|
||||||
|
// TODO: implement this better
|
||||||
|
if (!PLASTWINDOW && pWindow->m_sGroupData.pNextWindow && pWindow->m_sGroupData.pNextWindow != pWindow) {
|
||||||
|
auto curr = pWindow;
|
||||||
|
do {
|
||||||
|
curr = curr->m_sGroupData.pNextWindow;
|
||||||
|
if (curr->m_phForeignToplevel)
|
||||||
|
wlr_foreign_toplevel_handle_v1_set_activated(curr->m_phForeignToplevel, false);
|
||||||
|
} while (curr->m_sGroupData.pNextWindow != pWindow);
|
||||||
|
}
|
||||||
|
|
||||||
if (pWindow->m_phForeignToplevel)
|
if (pWindow->m_phForeignToplevel)
|
||||||
wlr_foreign_toplevel_handle_v1_set_activated(pWindow->m_phForeignToplevel, true);
|
wlr_foreign_toplevel_handle_v1_set_activated(pWindow->m_phForeignToplevel, true);
|
||||||
|
|
||||||
|
|
|
@ -687,7 +687,7 @@ void CWindow::setGroupCurrent(CWindow* pWindow) {
|
||||||
g_pCompositor->setWindowFullscreen(PCURRENT, false, WORKSPACE->m_efFullscreenMode);
|
g_pCompositor->setWindowFullscreen(PCURRENT, false, WORKSPACE->m_efFullscreenMode);
|
||||||
|
|
||||||
PCURRENT->setHidden(true);
|
PCURRENT->setHidden(true);
|
||||||
pWindow->setHidden(false);
|
pWindow->setHidden(false); // can remove m_pLastWindow
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->replaceWindowDataWith(PCURRENT, pWindow);
|
g_pLayoutManager->getCurrentLayout()->replaceWindowDataWith(PCURRENT, pWindow);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue