xwaylandmgr: round reported sizes

Since we round the sizes in the renderer, it's also a good idea to round the sizes reported to the apps. Fixes #3138
This commit is contained in:
vaxerski 2023-09-02 00:04:55 +02:00
parent d2a785dfe3
commit 2985e20e6a

View file

@ -176,9 +176,9 @@ void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, Vector2D size, bool f
} }
if (pWindow->m_bIsX11) if (pWindow->m_bIsX11)
wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, windowPos.x, windowPos.y, size.x, size.y); wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, windowPos.x, windowPos.y, std::round(size.x), std::round(size.y));
else else
wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x, size.y); wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, std::round(size.x), std::round(size.y));
} }
void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) { void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) {