diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-14 01:36:07 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-14 01:36:07 +0100 |
| commit | 70eb74c356d291f4b5e048abef7772864a4f95f1 (patch) | |
| tree | 66c99ea2334bdb92f035be1c282b47850956c9a7 /src/Window.cpp | |
| parent | 260ef788f55cdbccd3c32f57d4eeb4e37dc44aaf (diff) | |
fractional-scale: notify all surfaces on window move
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 3942114b..ff1ddbcd 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -291,6 +291,17 @@ void CWindow::moveToWorkspace(int workspaceID) { if (PMONITOR) g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(m_pWLSurface.wlr(), PMONITOR->scale); + + if (!m_bIsMapped) + return; + + wlr_surface_for_each_surface( + m_pWLSurface.wlr(), + [](wlr_surface* surf, int x, int y, void* data) { + const auto PMONITOR = g_pCompositor->getMonitorFromID(((CWindow*)data)->m_iMonitorID); + g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(surf, PMONITOR ? PMONITOR->scale : 1.f); + }, + this); } CWindow* CWindow::X11TransientFor() { |
