cursor-renderer-native: Fix hw cursor for non-square sprites

wl_shm_buffer_get_width() was used where wl_shm_buffer_get_height()
should have used, resulting in only square cursors working. Make
rectangular cursors work again.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1099
This commit is contained in:
Jonas Ådahl 2020-02-28 22:21:13 +01:00 committed by Georges Basile Stavracas Neto
parent 4b513a31ae
commit 390fd7ddcf

View File

@ -1331,7 +1331,7 @@ realize_cursor_sprite_from_wl_buffer_for_gpu (MetaCursorRenderer *renderer,
buffer_data = wl_shm_buffer_get_data (shm_buffer); buffer_data = wl_shm_buffer_get_data (shm_buffer);
width = wl_shm_buffer_get_width (shm_buffer); width = wl_shm_buffer_get_width (shm_buffer);
height = wl_shm_buffer_get_width (shm_buffer); height = wl_shm_buffer_get_height (shm_buffer);
switch (wl_shm_buffer_get_format (shm_buffer)) switch (wl_shm_buffer_get_format (shm_buffer))
{ {