mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 09:05:59 +01:00
screencopy: fix shm sharing if introspection required
This commit is contained in:
parent
9f2027be4b
commit
12ec549a18
1 changed files with 7 additions and 1 deletions
|
@ -464,9 +464,15 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec*
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pHyprRenderer->endRender();
|
||||||
|
|
||||||
|
g_pHyprRenderer->makeEGLCurrent();
|
||||||
|
g_pHyprOpenGL->m_RenderData.pMonitor = frame->pMonitor;
|
||||||
|
fb.bind();
|
||||||
|
|
||||||
glReadPixels(0, 0, frame->box.w, frame->box.h, PFORMAT->gl_format, PFORMAT->gl_type, data);
|
glReadPixels(0, 0, frame->box.w, frame->box.h, PFORMAT->gl_format, PFORMAT->gl_type, data);
|
||||||
|
|
||||||
g_pHyprRenderer->endRender();
|
g_pHyprOpenGL->m_RenderData.pMonitor = nullptr;
|
||||||
|
|
||||||
wlr_buffer_end_data_ptr_access(frame->buffer);
|
wlr_buffer_end_data_ptr_access(frame->buffer);
|
||||||
wlr_texture_destroy(sourceTex);
|
wlr_texture_destroy(sourceTex);
|
||||||
|
|
Loading…
Reference in a new issue