From 75d9795a065c0122e42d622fbeb83b18c47d4bbc Mon Sep 17 00:00:00 2001 From: Franz Berger Date: Mon, 5 Jun 2023 22:58:51 +0200 Subject: [PATCH] fix fractional scale update in moveToWorkspace --- src/Window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Window.cpp b/src/Window.cpp index ce3ee967..616d6abc 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -291,9 +291,12 @@ void CWindow::moveToWorkspace(int workspaceID) { m_iWorkspaceID = workspaceID; - const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID); + m_iMonitorID = PWORKSPACE->m_iMonitorID; + + const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); + if (PWORKSPACE) { g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%lx,%s", this, PWORKSPACE->m_szName.c_str())}); EMIT_HOOK_EVENT("moveWindow", (std::vector{this, PWORKSPACE}));