Bug 510647 - Non-resizable Shells open with wrong size (200x200)
Use gtk_window_get_size only for gtk 3.6.0 or newer due to the reported
issue on Ubuntu 12.
Change-Id: If11bd8ea03f0cb3c0bf923823310720e30ed8e7a
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
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 1827a6d..1083456 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1549,7 +1549,7 @@
@Override
long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) {
int width, height;
- if (OS.GTK3) {
+ if (OS.GTK_VERSION >= OS.VERSION(3, 6, 0)) {
int[] widthA = new int [1];
int[] heightA = new int [1];
OS.gtk_window_get_size(shellHandle, widthA, heightA);