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
This commit is contained in:
Bastien Nocera 2012-05-10 15:23:57 +01:00
parent 0c6b54aa44
commit 861c57e304

View File

@ -217,6 +217,13 @@ gdk_offscreen_window_reparent (GdkWindow *window,
return was_mapped; return was_mapped;
} }
static void
gdk_window_set_device_cursor (GdkWindow *window,
GdkDevice *device,
GdkCursor *cursor)
{
}
static void static void
from_embedder (GdkWindow *window, from_embedder (GdkWindow *window,
double embedder_x, double embedder_y, double embedder_x, double embedder_y,
@ -727,7 +734,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->move_resize = gdk_offscreen_window_move_resize; impl_class->move_resize = gdk_offscreen_window_move_resize;
impl_class->set_background = gdk_offscreen_window_set_background; impl_class->set_background = gdk_offscreen_window_set_background;
impl_class->reparent = gdk_offscreen_window_reparent; 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_geometry = gdk_offscreen_window_get_geometry;
impl_class->get_root_coords = gdk_offscreen_window_get_root_coords; impl_class->get_root_coords = gdk_offscreen_window_get_root_coords;
impl_class->get_device_state = gdk_offscreen_window_get_device_state; impl_class->get_device_state = gdk_offscreen_window_get_device_state;