diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index a0c05b22..d6c5b102 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -502,6 +502,7 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec* return false; } + g_pHyprOpenGL->m_RenderData.blockScreenShader = true; g_pHyprRenderer->endRender(); g_pHyprRenderer->makeEGLCurrent(); @@ -547,6 +548,7 @@ bool CScreencopyProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame) { g_pHyprOpenGL->renderTexture(sourceTex, &monbox, 1); g_pHyprOpenGL->setMonitorTransformEnabled(false); + g_pHyprOpenGL->m_RenderData.blockScreenShader = true; g_pHyprRenderer->endRender(); wlr_texture_destroy(sourceTex); diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp index e3273f7a..e2006afb 100644 --- a/src/protocols/ToplevelExport.cpp +++ b/src/protocols/ToplevelExport.cpp @@ -402,6 +402,7 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times return false; } + g_pHyprOpenGL->m_RenderData.blockScreenShader = true; g_pHyprRenderer->endRender(); g_pHyprRenderer->makeEGLCurrent(); @@ -441,6 +442,7 @@ bool CToplevelExportProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame, ti if (frame->overlayCursor) g_pHyprRenderer->renderSoftwareCursors(PMONITOR, fakeDamage, g_pInputManager->getMouseCoordsInternal() - frame->pWindow->m_vRealPosition.value()); + g_pHyprOpenGL->m_RenderData.blockScreenShader = true; g_pHyprRenderer->endRender(); return true; } diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index f5cf2624..b8b5a8b6 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -365,7 +365,7 @@ void CHyprOpenGLImpl::end() { } m_bEndFrame = true; - m_bApplyFinalShader = true; + m_bApplyFinalShader = !m_RenderData.blockScreenShader; if (m_RenderData.mouseZoomUseMouse) m_RenderData.useNearestNeighbor = true; @@ -388,6 +388,7 @@ void CHyprOpenGLImpl::end() { m_RenderData.mouseZoomFactor = 1.f; m_RenderData.mouseZoomUseMouse = true; m_RenderData.forceIntrospection = false; + m_RenderData.blockScreenShader = false; m_RenderData.currentFB = nullptr; m_RenderData.mainFB = nullptr; m_RenderData.outFB = nullptr; diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index b18e9108..723d7712 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -108,6 +108,7 @@ struct SCurrentRenderData { bool mouseZoomUseMouse = true; // true by default bool useNearestNeighbor = false; bool forceIntrospection = false; // cleaned in ::end() + bool blockScreenShader = false; Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1); Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1);