diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-05-11 15:24:55 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-05-11 15:24:55 +0000 |
commit | 7b3129ad4fecd3f98d81266a74cc460a7173ed4a (patch) | |
tree | dbc69550a9f0dcaf6d494fd7448229642fb7c36f | |
parent | 95e6a0650b4d0d8faafad0fabf4fa9073e5fee1e (diff) | |
parent | 7edd465f6d86674530a358a759a7f422b579351d (diff) | |
download | gtk+-7b3129ad4fecd3f98d81266a74cc460a7173ed4a.tar.gz |
Merge branch 'wip/restart-cursor-animation-gtk-3' into 'gtk-3-22'
wayland: Fix restarting cursor animation
See merge request GNOME/gtk!150
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index d17b5510b8..35c1c444df 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -419,13 +419,16 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device) else { pointer->cursor_timeout_id = 0; - return TRUE; + return G_SOURCE_REMOVE; } if (tablet) { if (!tablet->current_tool) - return retval; + { + pointer->cursor_timeout_id = 0; + return G_SOURCE_REMOVE; + } zwp_tablet_tool_v2_set_cursor (tablet->current_tool->wp_tablet_tool, pointer->enter_serial, @@ -440,7 +443,10 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device) x, y); } else - return retval; + { + pointer->cursor_timeout_id = 0; + return G_SOURCE_REMOVE; + } if (buffer) { @@ -462,7 +468,8 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device) if (next_image_index != pointer->cursor_image_index) { - if (next_image_delay != pointer->cursor_image_delay) + if (next_image_delay != pointer->cursor_image_delay || + pointer->cursor_timeout_id == 0) { guint id; |