From f5562941f70a448a2e292449296ff4c6ba26dc37 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 5 Apr 2022 18:32:06 +0200 Subject: [PATCH] fixed rounding of things not to be rounded --- src/helpers/WLClasses.hpp | 3 +++ src/render/Renderer.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index d8776af9..e06a5515 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -39,6 +39,9 @@ struct SRenderData { wlr_surface* surface = nullptr; int w, h; void* pMonitor = nullptr; + + // for rounding + bool dontRound = true; }; struct SKeyboard { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 8ba7a933..20354331 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -31,7 +31,7 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) { float matrix[9]; wlr_matrix_project_box(matrix, &windowBox, TRANSFORM, 0, RDATA->output->transform_matrix); - g_pHyprOpenGL->renderTexture(TEXTURE, matrix, 255.f, g_pConfigManager->getInt("decoration:rounding")); // TODO: fadeinout + g_pHyprOpenGL->renderTexture(TEXTURE, matrix, 255.f, RDATA->dontRound ? 0 : g_pConfigManager->getInt("decoration:rounding")); // TODO: fadeinout wlr_surface_send_frame_done(surface, RDATA->when); @@ -87,6 +87,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, SMonitor* pMonitor, timespec* renderdata.surface = g_pXWaylandManager->getWindowSurface(pWindow); renderdata.w = pWindow->m_vRealSize.x; renderdata.h = pWindow->m_vRealSize.y; + renderdata.dontRound = false; wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(pWindow), renderSurface, &renderdata);