aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2015-06-05 09:13:08 +1000
committernyamatongwe <unknown>2015-06-05 09:13:08 +1000
commitff4df20278adccde1452550c253fb898ec3a1eab (patch)
tree27990c7959c253a957effa4344d821bde9b7dfc7 /gtk/PlatGTK.cxx
parent0c48f964dfc4ddeb4e7ff883e5885719724c76bd (diff)
downloadscintilla-mirror-ff4df20278adccde1452550c253fb898ec3a1eab.tar.gz
Simplified retrieval of correct display for widget and ensure works on older versions of GTK+.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r--gtk/PlatGTK.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 742f4ce9b..91f35a189 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1338,16 +1338,7 @@ void Window::SetCursor(Cursor curs) {
return;
cursorLast = curs;
-#if GTK_CHECK_VERSION(2,24,0)
- GdkWindow *pwin = WindowFromWidget(PWidget(wid));
- if (!pwin)
- return;
- GdkDisplay *pdisplay = gdk_window_get_display(pwin);
-#else
- GdkDisplay *pdisplay = gdk_display_get_default();
-#endif
- if (!pdisplay)
- return;
+ GdkDisplay *pdisplay = gtk_widget_get_display(PWidget(wid));
GdkCursor *gdkCurs;
switch (curs) {