Skip to content

Commit

Permalink
internal: use newBuf data for storage of the bitmap
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Aug 7, 2023
1 parent 03bc27b commit 5ba3268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void Events::handleSCReady(void* lsdata, struct zwlr_screencopy_frame_v1* frame,

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);

Expand Down

0 comments on commit 5ba3268

Please sign in to comment.