Bug 487160: [GTK3] Using ScrolledComposite in a multi-page Wizard
results in improper sizing of widgets

*** This is a backport to the 4.6 branch of commit ID
59820e09018e388dc2218a420e6bc0f282221e06 ***

This bug is caused by getClientArea() returning the wrong size for a
child Composite, after setBounds() has been called on the parent.

In Control/Composite.setBounds(), the parent Composite/SwtFixed
container has its size adjusted by swt_fixed_resize(). In GTK this is
supposed to "trickle down" to the container's children and adjust their
sizes as well. GTK3 caches sizes, so setting a size on the parent and
fetching the child's size shortly thereafter might not always return the
updated size.

The fix is to allocate the size of the parent right away in
swt_fixed_resize(). This causes the sizing machinery to trigger a lot
earlier and update the size accordingly, prevent SWT from fetching the
wrong size and making a miscalculation.

Tested on GTK3.20, 3.18, 3.16, 3.14, and 2.24. No additional
AllNonBrowser JUnit test failures on GTK3 or GTK2.

Change-Id: I5d2a05c1ee605cbd7f77ce3fdd4ccada3337ed76
Signed-off-by: Eric Williams <ericwill@redhat.com>
1 file changed
tree: fc495b79b432ec8d34279ef9d04e22266d157d3f
  1. .gitignore
  2. README.md
  3. bundles/
  4. examples/
  5. features/
  6. local-build/
  7. pom.xml
  8. tests/

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

Information regarding source code management, builds, coding standards, and more.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).


Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!