diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-03 00:42:22 +0300 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-03 00:42:22 +0300 |
commit | 26da329d593c3d3e2d59fbd6c7fdc55bac80984c (patch) | |
tree | 94abbbe4d54f9059416dd455dbd641504a118abc /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java | |
parent | 09f1692137fcd35dbae7ea8049913ec763ba69df (diff) | |
download | eclipse.platform.swt-26da329d593c3d3e2d59fbd6c7fdc55bac80984c.tar.gz eclipse.platform.swt-26da329d593c3d3e2d59fbd6c7fdc55bac80984c.tar.xz eclipse.platform.swt-26da329d593c3d3e2d59fbd6c7fdc55bac80984c.zip |
Make use of gdk_x11_window_get_xid instead of gdk_x11_drawable_get_xid.
The former is a replacement for the later in GTK3.
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 73b4c6c806..4b0e578adc 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 @@ -558,7 +558,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*/ xWindow = OS.gdk_x11_drawable_get_xid (window); + long /*int*/ xWindow; + if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { + xWindow = OS.gdk_x11_window_get_xid (window); + } else { + xWindow = OS.gdk_x11_drawable_get_xid (window); + } OS.gdk_error_trap_push (); /* Use CurrentTime instead of the last event time to ensure that the shell becomes active */ OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime); |