aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wlr/types/wlr_screencopy_v1.h2
-rw-r--r--types/wlr_screencopy_v1.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/wlr/types/wlr_screencopy_v1.h b/include/wlr/types/wlr_screencopy_v1.h
index 26b4eef1..c74b8ecc 100644
--- a/include/wlr/types/wlr_screencopy_v1.h
+++ b/include/wlr/types/wlr_screencopy_v1.h
@@ -39,7 +39,7 @@ struct wlr_screencopy_frame_v1 {
uint32_t shm_format, dmabuf_format; // DRM format codes
struct wlr_box box;
- int stride;
+ int shm_stride;
bool overlay_cursor, cursor_locked;
diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c
index a1601dda..6c07889d 100644
--- a/types/wlr_screencopy_v1.c
+++ b/types/wlr_screencopy_v1.c
@@ -391,7 +391,7 @@ static void frame_handle_copy(struct wl_client *wl_client,
}
int32_t stride = wl_shm_buffer_get_stride(shm_buffer);
- if (stride != frame->stride) {
+ if (stride != frame->shm_stride) {
wl_resource_post_error(frame->resource,
ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER,
"invalid buffer stride");
@@ -578,11 +578,11 @@ static void capture_output(struct wl_client *wl_client,
}
frame->box = buffer_box;
- frame->stride = (shm_info->bpp / 8) * buffer_box.width;
+ frame->shm_stride = (shm_info->bpp / 8) * buffer_box.width;
zwlr_screencopy_frame_v1_send_buffer(frame->resource,
convert_drm_format_to_wl_shm(frame->shm_format),
- buffer_box.width, buffer_box.height, frame->stride);
+ buffer_box.width, buffer_box.height, frame->shm_stride);
if (version >= 3) {
if (frame->dmabuf_format != DRM_FORMAT_INVALID) {