mirror of https://github.com/hyprwm/Hyprland
renderer: avoid locking during rendering
it can trigger pointermgr to render which fucks up our pass fixes #5998
This commit is contained in:
parent
38911d6df4
commit
19186de118
|
@ -1247,6 +1247,10 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
|||
pMonitor->forceFullFrames = 10;
|
||||
}
|
||||
|
||||
bool lockSoftware = pMonitor == g_pCompositor->getMonitorFromCursor() && *PZOOMFACTOR != 1.f;
|
||||
if (lockSoftware)
|
||||
g_pPointerManager->lockSoftwareForMonitor(pMonitor->self.lock());
|
||||
|
||||
CRegion damage, finalDamage;
|
||||
if (!beginRender(pMonitor, damage, RENDER_MODE_NORMAL)) {
|
||||
Debug::log(ERR, "renderer: couldn't beginRender()!");
|
||||
|
@ -1341,14 +1345,6 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
|||
|
||||
if (renderCursor) {
|
||||
TRACY_GPU_ZONE("RenderCursor");
|
||||
|
||||
bool lockSoftware = pMonitor == g_pCompositor->getMonitorFromCursor() && *PZOOMFACTOR != 1.f;
|
||||
|
||||
if (lockSoftware) {
|
||||
g_pPointerManager->lockSoftwareForMonitor(pMonitor->self.lock());
|
||||
g_pPointerManager->renderSoftwareCursorsFor(pMonitor->self.lock(), &now, g_pHyprOpenGL->m_RenderData.damage);
|
||||
g_pPointerManager->unlockSoftwareForMonitor(pMonitor->self.lock());
|
||||
} else
|
||||
g_pPointerManager->renderSoftwareCursorsFor(pMonitor->self.lock(), &now, g_pHyprOpenGL->m_RenderData.damage);
|
||||
}
|
||||
|
||||
|
@ -1356,6 +1352,9 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
|||
|
||||
endRender();
|
||||
|
||||
if (lockSoftware)
|
||||
g_pPointerManager->unlockSoftwareForMonitor(pMonitor->self.lock());
|
||||
|
||||
TRACY_GPU_COLLECT;
|
||||
|
||||
if (!pMonitor->mirrors.empty()) {
|
||||
|
|
Loading…
Reference in New Issue