Blame eclipse-bug-408505.patch
|
Krzysztof Daniel |
976ff40 |
--- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java.bak 2013-01-28 12:16:08.000000000 +0100
|
|
Krzysztof Daniel |
976ff40 |
+++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 2013-02-19 13:22:29.529926456 +0100
|
|
Krzysztof Daniel |
976ff40 |
@@ -987,7 +987,17 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
|
|
Krzysztof Daniel |
976ff40 |
allocation.width = width;
|
|
Krzysztof Daniel |
976ff40 |
allocation.height = height;
|
|
Krzysztof Daniel |
976ff40 |
}
|
|
Krzysztof Daniel |
976ff40 |
- OS.gtk_widget_size_allocate (topHandle, allocation);
|
|
Krzysztof Daniel |
976ff40 |
+ /*
|
|
Krzysztof Daniel |
976ff40 |
+ * The widget needs to be shown before its size is allocated
|
|
Krzysztof Daniel |
976ff40 |
+ * in GTK 3.8 otherwise its allocation return 0
|
|
Krzysztof Daniel |
976ff40 |
+ */
|
|
Krzysztof Daniel |
976ff40 |
+ if (OS.GTK_VERSION >= OS.VERSION (3, 8, 0) && !OS.gtk_widget_get_visible(handle)) {
|
|
Krzysztof Daniel |
976ff40 |
+ OS.gtk_widget_show(handle);
|
|
Krzysztof Daniel |
976ff40 |
+ OS.gtk_widget_size_allocate (topHandle, allocation);
|
|
Krzysztof Daniel |
976ff40 |
+ OS.gtk_widget_hide(handle);
|
|
Krzysztof Daniel |
976ff40 |
+ } else {
|
|
Krzysztof Daniel |
976ff40 |
+ OS.gtk_widget_size_allocate (topHandle, allocation);
|
|
Krzysztof Daniel |
976ff40 |
+ }
|
|
Krzysztof Daniel |
976ff40 |
}
|
|
Krzysztof Daniel |
976ff40 |
/*
|
|
Krzysztof Daniel |
976ff40 |
* Bug in GTK. Widgets cannot be sized smaller than 1x1.
|