Bug 420180 - [GTK3] Use GTK 3.x (when available) by default on Linux/Unix instead of GTK 2.x
Summary: [GTK3] Use GTK 3.x (when available) by default on Linux/Unix instead of GTK 2.x
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Arun Thondapu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 340067 420182
  Show dependency tree
 
Reported: 2013-10-23 09:57 EDT by Arun Thondapu CLA
Modified: 2013-10-25 15:26 EDT (History)
6 users (show)

See Also:


Attachments
Proposed patch (1.17 KB, patch)
2013-10-24 15:12 EDT, Arun Thondapu CLA
arunkumar.thondapu: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arun Thondapu CLA 2013-10-23 09:57:00 EDT
Currently, Eclipse/SWT uses GTK+ 2.x libraries by default on Linux/Unix. However, GTK+ 3.x API/libraries can be used instead by setting the environment variable SWT_GTK3 to 1 before launching Eclipse. The GTK+ 3 port is fairly stable now and any outstanding issues/bugs are being tracked via bug 340067. 

Starting from Luna M3 build, we intend to use GTK+ 3 by default on Linux/Unix whenever the GTK+ 3.x libraries are installed and available. This will allow wider usage and testing of our GTK+ 3 port before we support it fully in the Luna release.

The environment variable SWT_GTK3 can still be used to force Eclipse to use GTK+ 2 by setting its value to 0.
Comment 1 Alexander Kurtakov CLA 2013-10-23 10:29:16 EDT
I would be in favour of such a move there is still quite a room for improvement (esp. with Gtk 3.10 adding a bunch of new drawing problems) but overall it should be quite good with lower versions. And having more people taking an eye would definetely help as staying on gtk 2.x is no longer an option especially if one consider the browsers situation.
Comment 2 Arun Thondapu CLA 2013-10-24 15:12:45 EDT
Created attachment 236859 [details]
Proposed patch

These changes cause SWT to use the GTK+ 3 libraries by default, unless forced to use GTK+ 2 libraries by setting the environment variable SWT_GTK3 to 0.

I have tested the patch as well as I could (considering changes are needed in the Eclipse launcher as well and its hard to test both these simultaneously) and it seems to work as expected. The launcher patch is in bug 420182.

Silenio, please review the patches and provide your feedback.  If you think the changes are fine, I would like to push them tomorrow so that we have enough time to test the M3 warm-up builds. Thanks!
Comment 3 Bogdan Gheorghe CLA 2013-10-25 15:26:03 EDT
Patch released with a small change. Thanks!

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=2d8f8190f028427bab88fdbd0fa258fbb0893019