From 60b880d9312574c3115d973fd532f2e15d1eafff Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 20 Jan 2023 19:44:30 +0100 Subject: wp-fractional-scaling-v1 impl (#1373) * Initial fractional scaling impl * apply UV after geom calcs * fix scaling -> scale * meson: add fractional scale proto Co-authored-by: Mihai Fufezan --- src/Window.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Window.cpp') 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); } } -- cgit v1.2.3