Refresh buffer on change in wlr_screencast.c

This commit is contained in:
columbarius 2020-08-04 17:47:42 +02:00 committed by Simon Ser
parent 9c353d6cfb
commit 9d4193e5b2
1 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,10 @@ static void wlr_frame_buffer(void *data, struct zwlr_screencopy_frame_v1 *frame,
munmap(cast->simple_frame.data, cast->simple_frame.size);
cast->simple_frame.data = NULL;
}
if (cast->simple_frame.data != NULL) {
wl_buffer_destroy(cast->simple_frame.buffer);
cast->simple_frame.buffer = NULL;
}
cast->simple_frame.width = width;
cast->simple_frame.height = height;
cast->simple_frame.stride = stride;