From 390fd7ddcfb3b9190460e5a9dbc2638c147488e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 28 Feb 2020 22:21:13 +0100 Subject: [PATCH] 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 --- src/backends/native/meta-cursor-renderer-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index 03f18e8b6..8c6b424d0 100644 --- a/src/backends/native/meta-cursor-renderer-native.c +++ b/src/backends/native/meta-cursor-renderer-native.c @@ -1331,7 +1331,7 @@ realize_cursor_sprite_from_wl_buffer_for_gpu (MetaCursorRenderer *renderer, buffer_data = wl_shm_buffer_get_data (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)) {