diff options
author | Vaxry <[email protected]> | 2023-01-20 19:44:30 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-01-20 19:44:30 +0100 |
commit | 60b880d9312574c3115d973fd532f2e15d1eafff (patch) | |
tree | b88cad7335c97c876f069f9d378589210332a95f /src/Window.cpp | |
parent | cee7bc6e742aa02675701f772f5e7ebfb56f11ab (diff) | |
download | Hyprland-60b880d9312574c3115d973fd532f2e15d1eafff.tar.gz Hyprland-60b880d9312574c3115d973fd532f2e15d1eafff.zip |
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 <[email protected]>
Diffstat (limited to 'src/Window.cpp')
-rw-r--r-- | src/Window.cpp | 3 |
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); } } |