From 01c6c5ae22b092c683096831978f77b6b532eca6 Mon Sep 17 00:00:00 2001 From: staz <74452129+alyanser@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:51:48 +0500 Subject: [PATCH] internal: Revert rounding of window size (#3153) * Revert "renderer: round coords and size in renderWindow" This reverts commit fc0c1896e097b3c3b2170ae69d38724e43960fe1. * Revert "xwaylandmgr: round reported sizes" This reverts commit 2985e20e6a5868e710aa3bdaa2789a2023010611. --- src/managers/XWaylandManager.cpp | 4 ++-- src/render/Renderer.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 78084591..76f979da 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, std::round(size.x), std::round(size.y)); + wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, windowPos.x, windowPos.y, size.x, size.y); else - wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, std::round(size.x), std::round(size.y)); + wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x, size.y); } void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 7d94cbd4..ed0feea9 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -271,7 +271,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* static auto* const PDIMAROUND = &g_pConfigManager->getConfigValuePtr("decoration:dim_around")->floatValue; static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue; - SRenderData renderdata = {pMonitor, time, std::round(REALPOS.x), std::round(REALPOS.y)}; + SRenderData renderdata = {pMonitor, time, REALPOS.x, REALPOS.y}; if (ignorePosition) { renderdata.x = pMonitor->vecPosition.x; renderdata.y = pMonitor->vecPosition.y; @@ -281,8 +281,8 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* decorate = false; renderdata.surface = pWindow->m_pWLSurface.wlr(); - renderdata.w = std::round(std::max(pWindow->m_vRealSize.vec().x, 5.0)); // clamp the size to min 5, - renderdata.h = std::round(std::max(pWindow->m_vRealSize.vec().y, 5.0)); // otherwise we'll have issues later with invalid boxes + renderdata.w = std::max(pWindow->m_vRealSize.vec().x, 5.0); // clamp the size to min 5, + renderdata.h = std::max(pWindow->m_vRealSize.vec().y, 5.0); // otherwise we'll have issues later with invalid boxes renderdata.dontRound = (pWindow->m_bIsFullscreen && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL) || (!pWindow->m_sSpecialRenderData.rounding); renderdata.fadeAlpha = pWindow->m_fAlpha.fl() * (pWindow->m_bPinned ? 1.f : PWORKSPACE->m_fAlpha.fl()); renderdata.alpha = pWindow->m_fActiveInactiveAlpha.fl();