aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-05-29 14:15:42 +1000
committerNeil <nyamatongwe@gmail.com>2015-05-29 14:15:42 +1000
commit02896fa261112444c26726104b0e22bb60bd7220 (patch)
treef7deff5ead9c0bdfc5692fd3eb257ef313de2a0e /gtk/ScintillaGTK.cxx
parent2ab57397b746471da640665c7fe81f267eea4be3 (diff)
downloadscintilla-mirror-02896fa261112444c26726104b0e22bb60bd7220.tar.gz
As of GTK+ 3.16, gdk_cursor_new is deprecated and has been replaced with
gdk_cursor_new_for_display.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r--gtk/ScintillaGTK.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index e5932a78b..e6d458c00 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -475,7 +475,9 @@ void ScintillaGTK::RealizeThis(GtkWidget *widget) {
attrs.colormap = gtk_widget_get_colormap(widget);
#endif
attrs.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK;
- GdkCursor *cursor = gdk_cursor_new(GDK_XTERM);
+ GdkWindow *pwin = gtk_widget_get_parent_window(widget);
+ GdkDisplay *pdisplay = gdk_window_get_display(pwin);
+ GdkCursor *cursor = gdk_cursor_new_for_display(pdisplay, GDK_XTERM);
attrs.cursor = cursor;
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_window(widget, gdk_window_new(gtk_widget_get_parent_window(widget), &attrs,
@@ -516,15 +518,15 @@ void ScintillaGTK::RealizeThis(GtkWidget *widget) {
gtk_widget_realize(PWidget(scrollbarv));
gtk_widget_realize(PWidget(scrollbarh));
- cursor = gdk_cursor_new(GDK_XTERM);
+ cursor = gdk_cursor_new_for_display(pdisplay, GDK_XTERM);
gdk_window_set_cursor(PWindow(wText), cursor);
UnRefCursor(cursor);
- cursor = gdk_cursor_new(GDK_LEFT_PTR);
+ cursor = gdk_cursor_new_for_display(pdisplay, GDK_LEFT_PTR);
gdk_window_set_cursor(PWindow(scrollbarv), cursor);
UnRefCursor(cursor);
- cursor = gdk_cursor_new(GDK_LEFT_PTR);
+ cursor = gdk_cursor_new_for_display(pdisplay, GDK_LEFT_PTR);
gdk_window_set_cursor(PWindow(scrollbarh), cursor);
UnRefCursor(cursor);