gdk: Use non-deprecated GdkCursor API

The non-display safe variant has been deprecated in GTK+ 3.15.
This commit is contained in:
Emmanuele Bassi 2014-12-03 12:11:55 +00:00
parent 7d7eb8aabd
commit 54efcf0e90

View File

@ -228,7 +228,7 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
if (!cursor_visible) if (!cursor_visible)
{ {
if (stage_gdk->blank_cursor == NULL) if (stage_gdk->blank_cursor == NULL)
stage_gdk->blank_cursor = gdk_cursor_new (GDK_BLANK_CURSOR); stage_gdk->blank_cursor = gdk_cursor_new_for_display (backend_gdk->display, GDK_BLANK_CURSOR);
attributes.cursor = stage_gdk->blank_cursor; attributes.cursor = stage_gdk->blank_cursor;
} }
@ -347,7 +347,11 @@ clutter_stage_gdk_set_cursor_visible (ClutterStageWindow *stage_window,
else else
{ {
if (stage_gdk->blank_cursor == NULL) if (stage_gdk->blank_cursor == NULL)
stage_gdk->blank_cursor = gdk_cursor_new (GDK_BLANK_CURSOR); {
GdkDisplay *display = clutter_gdk_get_default_display ();
stage_gdk->blank_cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
}
gdk_window_set_cursor (stage_gdk->window, stage_gdk->blank_cursor); gdk_window_set_cursor (stage_gdk->window, stage_gdk->blank_cursor);
} }