Bug 531048 [GTK3] Large problems drawing ownerdraw tables (fix)

TL;DR:
Gtk3 delays some Tree/Table initialization logic.
We wait till it's done first to finish some initialization after.
It's not a clean fix, but given SWT's custom drawing and requirement
for API to be win/cocoa consistent, I couldn't find a better fix.


Details:
Gtk3's delayed initialization breaks custom drawn Tree/Tables that have
invisible columns
because internally GTK skips a lot of initialization for invisible
items (for optimization).

Fix is to wait till this is done and in the mean time 'cache' the
'desired' state of a column in a hash table. Once initialization is
done, we flush state (i.e hide/show columns as requested).

Technical notes:
- Fix is same for Tree and Table.
- I put things into Control, because I have another fix in mind that
  will use the 'delayed' logic. (invisible Rowlayout had such issues).
- I piggy back onto 'draw' signal, which is only sent once
  Gtk3/Caching initialization has occured.
- I had to put columns into a hash table because some columns
  don't have a TableColumn java object associated with it.

On the side, this also fixes accessibility warning reported in 399522.

Verified against bug Snippet, jUnits, manual tests, child eclipse.

@ Reviewer, you can verify against snippet found in bug.
Before you get cheese, after thinngs work.

Patchset 4:
- Minor update, moved some code higher up into table/tree
so that check is only done for these two widgets and not for all
widgets.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5310483
Change-Id: I3152f64ddb296879d9bad08bdaeb5c38e0672ef8
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
8 files changed
tree: b67ed683b84c0b92007443e745b066b704e6fbe6
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. pom.xml
  8. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

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:

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!