gdk: Don't crash when resetting cursor

When the toplevel is a GdkOffscreenWindow which doesn't
implement the set_device_cursor() vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=675809
This commit is contained in:
Bastien Nocera 2012-05-10 15:23:57 +01:00
parent c837809960
commit 779591b62f

View File

@ -7805,7 +7805,8 @@ update_cursor (GdkDisplay *display,
* which native window has what cursor set. */
toplevel = get_event_toplevel (pointer_window);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (toplevel->impl);
impl_class->set_device_cursor (toplevel, device, cursor);
if (impl_class->set_device_cursor)
impl_class->set_device_cursor (toplevel, device, cursor);
}
static gboolean