screencopy: fix region sharing

translate before scaling if we are not dividing the coords
This commit is contained in:
vaxerski 2023-08-30 13:17:26 +02:00
parent 84c4a14dad
commit 32f4059b37

View file

@ -441,8 +441,8 @@ bool CScreencopyProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame) {
float glMatrix[9];
wlr_matrix_identity(glMatrix);
wlr_matrix_scale(glMatrix, frame->pMonitor->vecPixelSize.x, frame->pMonitor->vecPixelSize.y);
wlr_matrix_translate(glMatrix, -frame->box.x, -frame->box.y);
wlr_matrix_scale(glMatrix, frame->pMonitor->vecPixelSize.x, frame->pMonitor->vecPixelSize.y);
if (!wlr_renderer_begin_with_buffer(g_pCompositor->m_sWLRRenderer, frame->buffer)) {
wlr_texture_destroy(sourceTex);