diff --git a/glfw/wl_init.c b/glfw/wl_init.c index e30344857..372a0f306 100644 --- a/glfw/wl_init.c +++ b/glfw/wl_init.c @@ -165,6 +165,7 @@ static void setCursor(GLFWCursorShape shape) wl_surface_damage(surface, 0, 0, image->width, image->height); wl_surface_commit(surface); + _glfw.wl.cursorPreviousShape = shape; } static void pointerHandleMotion(void* data UNUSED, @@ -219,7 +220,8 @@ static void pointerHandleMotion(void* data UNUSED, default: assert(0); } - setCursor(cursorShape); + if (_glfw.wl.cursorPreviousShape != cursorShape) + setCursor(cursorShape); } static void pointerHandleButton(void* data UNUSED, diff --git a/glfw/wl_platform.h b/glfw/wl_platform.h index ee15384d5..2718aae3a 100644 --- a/glfw/wl_platform.h +++ b/glfw/wl_platform.h @@ -248,6 +248,7 @@ typedef struct _GLFWlibraryWayland struct wl_cursor_theme* cursorTheme; struct wl_surface* cursorSurface; + GLFWCursorShape cursorPreviousShape; uint32_t pointerSerial; int32_t keyboardRepeatRate;