diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-11-30 11:07:17 +0000 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-11-30 11:07:17 +0000 |
| commit | 12ec549a183abd59779a294c2f5bca0e95e528c0 (patch) | |
| tree | 2bebc0f1f644f4b2bddb1e37b9c73d9033314287 /src/protocols/Screencopy.cpp | |
| parent | 9f2027be4bd888c5828412848bd73ba694ee2dbc (diff) | |
screencopy: fix shm sharing if introspection required
Diffstat (limited to 'src/protocols/Screencopy.cpp')
| -rw-r--r-- | src/protocols/Screencopy.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index 2e00a509..50528ca3 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -464,9 +464,15 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec* 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); - g_pHyprRenderer->endRender(); + g_pHyprOpenGL->m_RenderData.pMonitor = nullptr; wlr_buffer_end_data_ptr_access(frame->buffer); wlr_texture_destroy(sourceTex); |
