aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index cb0565bf..e64835be 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -219,6 +219,9 @@ void CWindow::moveToWorkspace(int workspaceID) {
if (const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID); PWORKSPACE) {
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", this, PWORKSPACE->m_szName.c_str())});
}
+
+ if (const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); PMONITOR)
+ g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(g_pXWaylandManager->getWindowSurface(this), PMONITOR->scale);
}
}