diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-03 18:40:31 +0300 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-03 18:40:31 +0300 |
commit | 265077a96d57dc2a0b297a8aed26edc86ff6299e (patch) | |
tree | 87476da0de4ad5a0d179802e03a2d2e78aeb16b4 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java | |
parent | 26da329d593c3d3e2d59fbd6c7fdc55bac80984c (diff) | |
download | eclipse.platform.swt-265077a96d57dc2a0b297a8aed26edc86ff6299e.tar.gz eclipse.platform.swt-265077a96d57dc2a0b297a8aed26edc86ff6299e.tar.xz eclipse.platform.swt-265077a96d57dc2a0b297a8aed26edc86ff6299e.zip |
Conditional usage of gdk_x11_drawable_get_xdisplay.
Replaced with gdk_x11_display_get_xdisplay calls where needed and make
gdk_x11_drawable_get_xdisplay dynamic.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index 4b0e578adc..2306ee6270 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -557,7 +557,12 @@ void bringToTop (boolean force) { */ long /*int*/ window = gtk_widget_get_window (shellHandle); if ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) { - long /*int*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); + long /*int*/ xDisplay; + if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { + xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_window_get_display(window)); + } else { + xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); + } long /*int*/ xWindow; if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { xWindow = OS.gdk_x11_window_get_xid (window); |