Merge branch 'window-cursor' into 'master'

window: Set cursor on the right surface

See merge request GNOME/gtk!792
This commit is contained in:
Benjamin Otte 2019-04-29 19:02:21 +00:00
commit 5fd94e2027

View File

@ -9876,6 +9876,9 @@ update_cursor (GtkWindow *toplevel,
GtkWidget *target)
{
GdkCursor *cursor = NULL;
GdkSurface *surface;
surface = gtk_widget_get_surface (target);
if (grab_widget && !gtk_widget_is_ancestor (target, grab_widget))
{
@ -9903,8 +9906,7 @@ update_cursor (GtkWindow *toplevel,
}
}
gdk_surface_set_device_cursor (gtk_widget_get_surface (GTK_WIDGET (toplevel)),
device, cursor);
gdk_surface_set_device_cursor (surface, device, cursor);
}
void