539220 : GLCanvas does not work with GTK3 Specify GDK_WA_VISUAL constant depending weather GTK2 or GTK3 is used. Use the snippet in bug description and follow the instructions to run the snippet. No JUnit Tests performed Change-Id: Id8f9272f3e8248422a7c6e38e027a55425fc68b2 Signed-off-by: Felix Hirsch <felix.hirsch@gmail.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java index 2fca225..108e09d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -252,7 +252,7 @@ public static final int GDK_UNMAP = 15; public static final int GDK_WA_X = 1 << 2; public static final int GDK_WA_Y = 1 << 3; - public static final int GDK_WA_VISUAL = 1 << 6; + public static final int GDK_WA_VISUAL = GTK.GTK3 ? (1<<5) : (1<<6); public static final int GDK_WINDOW_TYPE_HINT_DIALOG = 1; public static final int GDK_WINDOW_TYPE_HINT_UTILITY = 5; public static final int GDK_WINDOW_TYPE_HINT_TOOLTIP = 10;