internal: use newBuf data for storage of the bitmap

This commit is contained in:
Vaxry 2023-08-07 18:58:44 +02:00
parent 03bc27be94
commit 5ba3268694
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ void Events::handleSCReady(void* lsdata, struct zwlr_screencopy_frame_v1* frame,
cairo_surface_flush(oldSurface); cairo_surface_flush(oldSurface);
newBuf.surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, transformedSize.x, transformedSize.y); newBuf.surface = cairo_image_surface_create_for_data((unsigned char*)newBuf.data, CAIRO_FORMAT_ARGB32, transformedSize.x, transformedSize.y, transformedSize.x * 4);
const auto PCAIRO = cairo_create(newBuf.surface); const auto PCAIRO = cairo_create(newBuf.surface);