mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 22:25:59 +01:00
renderer: block screen shader on screencopy
This commit is contained in:
parent
02717bf8d1
commit
632a5c2171
4 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue