[gtk+/gtk-3-4] gdkoffscreenwindow: Don't crash when resetting cursor
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] gdkoffscreenwindow: Don't crash when resetting cursor
- Date: Tue, 15 May 2012 17:24:30 +0000 (UTC)
commit f78cf0806b9351002586b0d6ac81acd1059e42fc
Author: Bastien Nocera <hadess hadess net>
Date: Thu May 10 15:23:57 2012 +0100
gdkoffscreenwindow: Don't crash when resetting cursor
When the toplevel is a GdkOffscreenWindow which doesn't
implement the set_device_cursor() vfunc, we would have
crashed. Implement a dummy ->set_device_cursor vfunc.
https://bugzilla.gnome.org/show_bug.cgi?id=675809
gdk/gdkoffscreenwindow.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 837cffb..e0c1a76 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -218,6 +218,13 @@ gdk_offscreen_window_reparent (GdkWindow *window,
}
static void
+gdk_window_set_device_cursor (GdkWindow *window,
+ GdkDevice *device,
+ GdkCursor *cursor)
+{
+}
+
+static void
from_embedder (GdkWindow *window,
double embedder_x, double embedder_y,
double *offscreen_x, double *offscreen_y)
@@ -727,7 +734,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->move_resize = gdk_offscreen_window_move_resize;
impl_class->set_background = gdk_offscreen_window_set_background;
impl_class->reparent = gdk_offscreen_window_reparent;
- impl_class->set_device_cursor = NULL;
+ impl_class->set_device_cursor = gdk_offscreen_window_set_device_cursor;
impl_class->get_geometry = gdk_offscreen_window_get_geometry;
impl_class->get_root_coords = gdk_offscreen_window_get_root_coords;
impl_class->get_device_state = gdk_offscreen_window_get_device_state;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]