From 909330f3473a8f1c38196709677753a3c815f688 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 5 Nov 2017 11:20:42 -0500 Subject: [PATCH] wayland: Fix animated cursors We must reset the image delay when stopping the timeout, otherwise the code setting it up thinks it is still running. This fixes cursor animation only working for the very first enter of a widget with an animated cursor, as seen in the cursors example in gtk4-demo. --- gdk/wayland/gdkdevice-wayland.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 4c7789b3e2..73ce17d87e 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -350,6 +350,7 @@ gdk_wayland_pointer_stop_cursor_animation (GdkWaylandPointerData *pointer) { g_source_remove (pointer->cursor_timeout_id); pointer->cursor_timeout_id = 0; + pointer->cursor_image_delay = 0; } pointer->cursor_image_index = 0;