Bug 481122: [GTK3.18+] some set/get Background/Foreground color methods
have no effect

With changes in GTK3.18 and onward, gtk_style_context_get_color()
behaves differently. In order to correctly fetch the color we must first
save the GtkStyleContext, set its state, fetch the color, and then
restore the GtkStyleContext. Failure to do this on GTK3.18+ leads to
failures in the getForegroundColor() method.

The convenience method styleContextGetColor() in Display takes care of
the process.

Tested on GTK 3.18, 3.16, 3.14, 3.8, and 2.24. All foreground color
related tests on GTK3 now pass. GTK2 behaviour remains unchanged.

Change-Id: I6423edab5038dc0ef54afc6dd826f19fc936f987
Signed-off-by: Eric Williams <ericwill@redhat.com>
3 files changed
tree: eb7bd96d3b2facad9733b3ddb6456f329304471d
  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:

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:

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!