fractional-scale: notify all surfaces on window move

This commit is contained in:
vaxerski 2023-04-14 01:36:07 +01:00
parent 260ef788f5
commit 70eb74c356

View file

@ -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() {