Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-09-13 06:25:27 +0000
committerAlexander Kurtakov2018-09-13 08:53:49 +0000
commita2047a34bf62e56a4db21ea888c7df518c56879c (patch)
treed2ccbcc8a0e99e9aab6a12d127a7fcd1e09be5cb
parent51f186860cf78feed41f66d8c2b2d32cf7b573ab (diff)
downloadeclipse.platform.swt-a2047a34bf62e56a4db21ea888c7df518c56879c.tar.gz
eclipse.platform.swt-a2047a34bf62e56a4db21ea888c7df518c56879c.tar.xz
eclipse.platform.swt-a2047a34bf62e56a4db21ea888c7df518c56879c.zip
Bug 530841: [GTK2] Remove GTK 2.x support
Handle swt_awt bridge. Change-Id: Idd426f03715fa66d4f97bff2d026658efff8a6e3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
index dcce742af7..15a00b9bf5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
@@ -89,12 +89,8 @@ static synchronized void initializeSwing() {
* that make SWT exit. The fix is to hide all X
* errors when AWT is running.
*/
- if (GTK.GTK3) {
- if (OS.isX11()) {
- GDK.gdk_x11_display_error_trap_push(GDK.gdk_display_get_default());
- }
- } else {
- GDK.gdk_error_trap_push();
+ if (OS.isX11()) {
+ GDK.gdk_x11_display_error_trap_push(GDK.gdk_display_get_default());
}
try {
/* Initialize the default focus traversal policy */
@@ -192,12 +188,7 @@ public static Frame new_Frame (final Composite parent) {
Shell shell = parent.getShell();
long /*int*/ awtHandle = getAWTHandle(window);
if (awtHandle == 0) return;
- long /*int*/ xWindow;
- if (GTK.GTK3) {
- xWindow = GDK.gdk_x11_window_get_xid (GTK.gtk_widget_get_window (shell.handle));
- } else {
- xWindow = GDK.gdk_x11_drawable_get_xid(GTK.gtk_widget_get_window(GTK.gtk_widget_get_toplevel(shell.handle)));
- }
+ long /*int*/ xWindow = GDK.gdk_x11_window_get_xid (GTK.gtk_widget_get_window (shell.handle));
OS.XSetTransientForHint(GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()), awtHandle, xWindow);
});
}

Back to the top