From f755351511a44f6477ac36b6d9ae2cc3164f163d Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 6 Nov 2022 17:58:56 +0000 Subject: [PATCH] Fix resize transitions on multimon + transformed --- src/render/OpenGL.hpp | 4 ++++ src/render/Renderer.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index dbc2977c..7e8fccde 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -12,6 +12,8 @@ #include "Texture.hpp" #include "Framebuffer.hpp" +class CHyprRenderer; + inline const float fullVerts[] = { 1, 0, // top right 0, 0, // top left @@ -144,6 +146,8 @@ private: void renderSplash(cairo_t *const, cairo_surface_t *const, double); void preBlurForCurrentMonitor(); + + friend class CHyprRenderer; }; inline std::unique_ptr g_pHyprOpenGL; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 60238144..baa8dcb3 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -232,8 +232,8 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* SRenderData renderdata = {pMonitor->output, time, REALPOS.x, REALPOS.y}; if (ignorePosition) { - renderdata.x = 0; - renderdata.y = 0; + renderdata.x = pMonitor->vecPosition.x; + renderdata.y = pMonitor->vecPosition.y; } renderdata.surface = g_pXWaylandManager->getWindowSurface(pWindow); @@ -304,7 +304,9 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* g_pHyprOpenGL->m_RenderData.primarySurfaceUVTopLeft = {0, 0}; g_pHyprOpenGL->m_RenderData.primarySurfaceUVBottomRight = { pWindow->m_vRealSize.m_vBegun.x / pMonitor->vecPixelSize.x, pWindow->m_vRealSize.m_vBegun.y / pMonitor->vecPixelSize.y}; + g_pHyprOpenGL->m_bEndFrame = true; g_pHyprOpenGL->renderTexture(PFB->second.m_cTex, &box, (1.f - pWindow->m_vRealSize.getPercent()) * 84.f, 0, false, true); + g_pHyprOpenGL->m_bEndFrame = false; g_pHyprOpenGL->m_RenderData.primarySurfaceUVTopLeft = Vector2D(-1, -1); g_pHyprOpenGL->m_RenderData.primarySurfaceUVBottomRight = Vector2D(-1, -1);