From 8820f7f210b1183c97dd58028093c27355a992e7 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 29 Jun 2022 12:54:53 +0200 Subject: optimization + revert one oopsie --- src/render/Renderer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/render/Renderer.cpp') diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index e0891710..b1ecde71 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -13,15 +13,12 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) { wlr_box windowBox; if (RDATA->surface && surface == RDATA->surface) { - windowBox = {(int)RDATA->x + x, (int)RDATA->y + y, RDATA->w, RDATA->h}; + windowBox = {(int)outputX + RDATA->x + x, (int)outputY + RDATA->y + y, RDATA->w, RDATA->h}; } else { // here we clamp to 2, these might be some tiny specks - windowBox = {(int)RDATA->x + x, (int)RDATA->y + y, std::clamp(surface->current.width, 2, 1337420), std::clamp(surface->current.height, 2, 1337420)}; + windowBox = {(int)outputX + RDATA->x + x, (int)outputY + RDATA->y + y, std::clamp(surface->current.width, 2, 1337420), std::clamp(surface->current.height, 2, 1337420)}; } scaleBox(&windowBox, RDATA->output->scale); - windowBox.x += outputX; - windowBox.y += outputY; - static auto *const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue; float rounding = RDATA->dontRound ? 0 : RDATA->rounding == -1 ? *PROUNDING : RDATA->rounding; -- cgit v1.2.3