Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEric Williams2018-05-30 18:31:33 +0000
committerEric Williams2018-06-06 20:05:49 +0000
commit820c46cbb7018b48aa8791ca34c8025246bda964 (patch)
treebfa0211d69d8f6e459047d13a329636acfd11643 /tests
parent05a9e389988d0135e5257c26f362880d3b1750af (diff)
downloadeclipse.platform.swt-820c46cbb7018b48aa8791ca34c8025246bda964.tar.gz
eclipse.platform.swt-820c46cbb7018b48aa8791ca34c8025246bda964.tar.xz
eclipse.platform.swt-820c46cbb7018b48aa8791ca34c8025246bda964.zip
Bug 319612: [Gtk] Shell.getSize() returns wrong value when created with
style SWT.RESIZE | SWT.ON_TOP Ignore hardcoded trim when calculating sizes for shells with SWT.ON_TOP and SWT.RESIZE set (i.e. "custom resize" shells). These shells already use border as set by gtk_container_set_border_width() -- subtracting the trimming in Shell.setBounds() is unnecessary. Tested on GTK3.22 on X11 and Wayland. A JUnit test case to reproduce the issue is attached. No AllNonBrowser JUnit tests fail. Change-Id: I81ebd319b623dfb3b98c533996a43e6435e80d2f Signed-off-by: Eric Williams <ericwill@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
index 87a7c4fa4f..1d1cd096dc 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
@@ -718,6 +718,22 @@ public void test_setSizeII() {
}
+@Test
+public void test_setSizeCustomResize() {
+ /*
+ * Bug 319612: test the case where Shells with SWT.RESIZE and SWT.ON_TOP
+ * were shrinking in size. Only applicable to GTK (both GTK2 and GTK3).
+ */
+ if (SwtTestUtil.isGTK) {
+ Shell testShell = new Shell (shell, SWT.RESIZE | SWT.ON_TOP);
+ Point size = new Point (200, 200);
+ testShell.setSize(size);
+ testShell.open();
+ assertEquals(size, testShell.getSize());
+ testShell.dispose();
+ }
+}
+
@Override
@Test
public void test_setSizeLorg_eclipse_swt_graphics_Point() {

Back to the top