diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2013-04-29 08:31:59 -0400 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2013-04-30 10:53:04 +0300 |
commit | 873a9a76611be625b45716322ad5255e3ae4a6fc (patch) | |
tree | f0c63316d88f12166323db7cecad8621956fb8c3 /bundles | |
parent | 99e4edefe372e2c463379777ecf1fc5a600cb35b (diff) | |
download | eclipse.platform.swt-873a9a76611be625b45716322ad5255e3ae4a6fc.tar.gz eclipse.platform.swt-873a9a76611be625b45716322ad5255e3ae4a6fc.tar.xz eclipse.platform.swt-873a9a76611be625b45716322ad5255e3ae4a6fc.zip |
Fix for initial bounds not set on GTK 3.
There is the following printed on console:
Gtk-CRITICAL **: gtk_widget_set_allocation: assertion
`gtk_widget_get_visible (widget) || gtk_widget_is_toplevel (widget)'
failed. The critical part is that this breaks even the workspace
selection dialog (it's empty) on GTK 3.
A workaround is to make the widget visible. It's done for GTK 3 only to
prevent any possible problem on GTK 2 because of it.
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 14a41ac7e0..12219c962e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -4385,6 +4385,9 @@ void setInitialBounds () { } if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { allocation.y = 0; + if (OS.GTK3) { + OS.gtk_widget_set_visible(topHandle, true); + } OS.gtk_widget_set_allocation(topHandle, allocation); } else { OS.GTK_WIDGET_SET_Y (topHandle, 0); |