Merge branch 'wip/restart-cursor-animation' into 'master'

wayland: Fix restarting cursor animation

See merge request GNOME/gtk!149
This commit is contained in:
Matthias Clasen 2018-05-17 09:59:45 +00:00
commit daca4b9a39

View File

@ -405,13 +405,16 @@ gdk_wayland_device_update_surface_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,
@ -426,7 +429,10 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
x, y);
}
else
return retval;
{
pointer->cursor_timeout_id = 0;
return G_SOURCE_REMOVE;
}
if (buffer)
{
@ -450,7 +456,8 @@ gdk_wayland_device_update_surface_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;