aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2015-06-05 09:13:08 +1000
committernyamatongwe <devnull@localhost>2015-06-05 09:13:08 +1000
commit5936c8959bd782a79f6215c12d5235454e82aa2f (patch)
tree2d38ed03d1e9df404b196893bd3068dccf5068cc /gtk/PlatGTK.cxx
parentaac2be8ef9583ddccbb18ed281d7cf525ddb7b09 (diff)
downloadscintilla-mirror-5936c8959bd782a79f6215c12d5235454e82aa2f.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) {