From 2985e20e6a5868e710aa3bdaa2789a2023010611 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 2 Sep 2023 00:04:55 +0200 Subject: [PATCH] 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 --- src/managers/XWaylandManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 76f979da..78084591 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -176,9 +176,9 @@ void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, Vector2D size, bool f } 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 - 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) {