[gtk+] gdk: Don't crash when resetting cursor
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Don't crash when resetting cursor
- Date: Tue, 15 May 2012 16:56:50 +0000 (UTC)
commit 779591b62fbc5ee4ebf9912a4416b655cdcf4e32
Author: Bastien Nocera <hadess hadess net>
Date: Thu May 10 15:23:57 2012 +0100
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
gdk/gdkwindow.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 2683073..b7e6a13 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]