diff options
author | Eric Williams | 2018-01-10 17:00:42 +0000 |
---|---|---|
committer | Eric Williams | 2018-01-10 17:00:42 +0000 |
commit | f921277a44070c7bf94231ae1eda6e6eea4601cd (patch) | |
tree | 3b60c8e99956f52ebd5fa5d56251c3a6d77f28f6 | |
parent | 4d3e9a159f1a3b267d2c2a7bac7b84f67a51f26b (diff) | |
download | eclipse.platform.swt-f921277a44070c7bf94231ae1eda6e6eea4601cd.tar.gz eclipse.platform.swt-f921277a44070c7bf94231ae1eda6e6eea4601cd.tar.xz eclipse.platform.swt-f921277a44070c7bf94231ae1eda6e6eea4601cd.zip |
Bug 529026: [GTK3.20+] Test failures in org.eclipse.ui.tests.forms
Backport of original patch onto the 4.7 maintenance branch.
Change-Id: I8a486a6081fa254e6312505fa7e81493e34b96bc
Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index 3a8a734d42..4644cee205 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -365,6 +365,14 @@ int hScrollBarWidth() { hBarHandle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle); if (hBarHandle==0) return 0; GtkRequisition requisition = new GtkRequisition(); + /* + * Feature in GTK3: sometimes the size reported lags on GTK3.20+. + * Calling gtk_widget_queue_resize() before querying the size + * fixes this issue. + */ + if (OS.GTK_VERSION >= OS.VERSION(3, 20, 0)) { + OS.gtk_widget_queue_resize (hBarHandle); + } gtk_widget_get_preferred_size (hBarHandle, requisition); int [] padding = new int [1]; OS.gtk_widget_style_get(scrolledHandle, OS.scrollbar_spacing, padding, 0); |