toplevelexport: avoid locking software cursors during render

this may trigger a render begin/end and fuck up the pass

fixes #6277
This commit is contained in:
Vaxry 2024-06-03 21:10:31 +02:00
parent b30c7125d7
commit 0ac0f32671

View file

@ -378,16 +378,16 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times
CFramebuffer outFB; CFramebuffer outFB;
outFB.alloc(PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y, g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XBGR8888 : PMONITOR->drmFormat); outFB.alloc(PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y, g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XBGR8888 : PMONITOR->drmFormat);
if (!g_pHyprRenderer->beginRender(PMONITOR, fakeDamage, RENDER_MODE_FULL_FAKE, nullptr, &outFB)) {
wlr_buffer_end_data_ptr_access(frame->buffer);
return false;
}
if (frame->overlayCursor) { if (frame->overlayCursor) {
g_pPointerManager->lockSoftwareForMonitor(PMONITOR->self.lock()); g_pPointerManager->lockSoftwareForMonitor(PMONITOR->self.lock());
g_pPointerManager->damageCursor(PMONITOR->self.lock()); g_pPointerManager->damageCursor(PMONITOR->self.lock());
} }
if (!g_pHyprRenderer->beginRender(PMONITOR, fakeDamage, RENDER_MODE_FULL_FAKE, nullptr, &outFB)) {
wlr_buffer_end_data_ptr_access(frame->buffer);
return false;
}
g_pHyprOpenGL->clear(CColor(0, 0, 0, 1.0)); g_pHyprOpenGL->clear(CColor(0, 0, 0, 1.0));
// render client at 0,0 // render client at 0,0