aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-09 00:02:21 +0200
committeremersion <contact@emersion.fr>2017-10-09 00:02:21 +0200
commit008e1d596d00614ab4ead873a96aa2220b88bcd7 (patch)
treed482cedd5a3ea9b874bcb62d64b7d12b2a2bb10f
parentc7a4346bfc5db9e0af070271ff12dad25f6bddd3 (diff)
Fix cursor stride
-rw-r--r--types/wlr_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c
index fbecbb2e..d772ea06 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -190,8 +190,9 @@ static void handle_cursor_surface_commit(struct wl_listener *listener,
void *buffer_data = wl_shm_buffer_get_data(buffer);
int32_t width = wl_shm_buffer_get_width(buffer);
int32_t height = wl_shm_buffer_get_height(buffer);
+ int32_t stride = wl_shm_buffer_get_stride(buffer);
wl_shm_buffer_begin_access(buffer);
- wlr_output_set_cursor(output, buffer_data, width, width, height,
+ wlr_output_set_cursor(output, buffer_data, stride/4, width, height,
output->cursor.hotspot_x, output->cursor.hotspot_y);
wl_shm_buffer_end_access(buffer);
}