summaryrefslogtreecommitdiff
path: root/src/desktop/Window.cpp
diff options
context:
space:
mode:
authorSungyoon Cho <sungyoon@sungyooncho.dev>2024-04-20 02:46:16 +0900
committerGitHub <noreply@github.com>2024-04-19 18:46:16 +0100
commitdd39cd7e420750ac832e1c3e51fac87c16ae8ea3 (patch)
treec7b8afe048df28dd04673d46ad673d5c812e87d4 /src/desktop/Window.cpp
parent4d0a63523751a590a521fd873f770825023069ae (diff)
windows: recalculate monitor after updating windows (#5647)
Recalculate monitor after updating windows, so layout render doesn't get overridden.
Diffstat (limited to 'src/desktop/Window.cpp')
-rw-r--r--src/desktop/Window.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index b81cb1a4..737d5ef7 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -392,8 +392,12 @@ void CWindow::moveToWorkspace(PHLWORKSPACE pWorkspace) {
g_pCompositor->updateWorkspaceWindows(OLDWORKSPACE->m_iID);
g_pCompositor->updateWorkspaceSpecialRenderData(OLDWORKSPACE->m_iID);
+ g_pLayoutManager->getCurrentLayout()->recalculateMonitor(OLDWORKSPACE->m_iMonitorID);
+
g_pCompositor->updateWorkspaceWindows(workspaceID());
g_pCompositor->updateWorkspaceSpecialRenderData(workspaceID());
+ g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m_iMonitorID);
+
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
if (valid(pWorkspace)) {
@@ -486,6 +490,7 @@ void CWindow::onUnmap() {
g_pCompositor->updateWorkspaceWindows(workspaceID());
g_pCompositor->updateWorkspaceSpecialRenderData(workspaceID());
+ g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m_iMonitorID);
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
m_pWorkspace.reset();
@@ -853,9 +858,9 @@ void CWindow::createGroup() {
addWindowDeco(std::make_unique<CHyprGroupBarDecoration>(this));
- g_pLayoutManager->getCurrentLayout()->recalculateWindow(this);
g_pCompositor->updateWorkspaceWindows(workspaceID());
g_pCompositor->updateWorkspaceSpecialRenderData(workspaceID());
+ g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m_iMonitorID);
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
}
}
@@ -871,6 +876,7 @@ void CWindow::destroyGroup() {
updateWindowDecos();
g_pCompositor->updateWorkspaceWindows(workspaceID());
g_pCompositor->updateWorkspaceSpecialRenderData(workspaceID());
+ g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m_iMonitorID);
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
return;
}
@@ -901,6 +907,7 @@ void CWindow::destroyGroup() {
g_pCompositor->updateWorkspaceWindows(workspaceID());
g_pCompositor->updateWorkspaceSpecialRenderData(workspaceID());
+ g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m_iMonitorID);
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
}