Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 435773

Summary: [GTK3] [GTK 3.10] Tree/table owner draw is broken on Linux (with scroll bar)
Product: [Eclipse Project] Platform Reporter: Thomas Singer <eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: akurtakov, arunkumar.thondapu, daniel_megert, loskutov, lufimtse, malaperle, markus.kell.r, sergio, steven_pehrson
Version: 4.4   
Target Milestone: 4.5   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 441566, 462881    
Attachments:
Description Flags
large enough window
none
too small window
none
Screenshot with SWT_GTK set to 0 none

Description Thomas Singer CLA 2014-05-26 08:39:50 EDT
Created attachment 243488 [details]
large enough window

I've tried SWT from 4.4 RC 2 on Ubuntu 14.04 using the Snippet230. If the window is large enough to show all rows, the owner-drawn image is shown. If a scrollbar is shown because the window is too small, only the column's set text is shown - nothing which is owner-drawn.
Comment 1 Thomas Singer CLA 2014-05-26 08:40:16 EDT
Created attachment 243489 [details]
too small window
Comment 2 Sravan Kumar Lakkimsetti CLA 2014-05-27 07:07:38 EDT
This Problem is very specific to GTK version 3.10. this is not reproducible in GTK 3.8. Please use GTK2 as a workaround.

GTK2 can be enabled by adding the following lines to ini file
--launcher.GTK_version
2

or you can set the environment variable SWT_GTK3 to 0.

We donot normally use gtk version 3.10 we fall back to gtk version 2.x whenever we find gtk version 3.10 and above. in the normal usage of eclipse you should not see this problem.
Comment 3 Thomas Singer CLA 2014-05-28 03:03:02 EDT
Created attachment 243601 [details]
Screenshot with SWT_GTK set to 0

I can confirm that setting the VM property "SWT_GTK3" to "0" seems to solve this problem. For the records I've added a screenshot which differs also from the one produced by the "large enough window".
Comment 4 Marc-André Laperle CLA 2014-05-28 14:18:46 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #2)
> We donot normally use gtk version 3.10 we fall back to gtk version 2.x
> whenever we find gtk version 3.10 and above. in the normal usage of eclipse
> you should not see this problem.

That's true for Eclipse but not for "pure" SWT applications. I think Thomas is looking at SmartGit/Hg which doesn't use the Eclipse launcher, just SWT. Shouldn't the version check also be done at the SWT level (OS.java?)
Comment 5 Markus Keller CLA 2014-06-18 08:20:47 EDT
(In reply to Marc-Andre Laperle from comment #4)
> Shouldn't the version check also be done at the SWT level (OS.java?)

It is, see (Sravan Kumar Lakkimsetti from comment #2)
> or you can set the environment variable SWT_GTK3 to 0.
Comment 6 Sravan Kumar Lakkimsetti CLA 2014-10-21 05:47:36 EDT
We have analysed the code in in swt. We feel this problem is in GTK 3.10. This will require some more effort in fixing this problem

So moving this to M4
Comment 7 Thomas Singer CLA 2014-10-21 07:59:43 EDT
Do you mean owner-draw is not working in GTK 3.10?

Maybe you are right that the core problem is in GTK, but is there a work-around that you can build in quickly and remove later if it has been fixed in GTK?
Comment 8 Sravan Kumar Lakkimsetti CLA 2014-12-05 03:41:58 EST
Hi,

I am working on a workaround for this and turning out to be nightmare for me. Since the M$ release is around the corner I am moving out of M4.

Thanks
Sravan
Comment 9 Sravan Kumar Lakkimsetti CLA 2014-12-05 03:43:20 EST
Hi,

I am working on a workaround for this and turning out to be nightmare for me. Since the M4 release is around the corner I am moving out of M4.

Thanks
Sravan
Comment 10 Andrey Loskutov CLA 2015-01-03 07:49:16 EST
*** Bug 456556 has been marked as a duplicate of this bug. ***
Comment 11 Andrey Loskutov CLA 2015-01-03 08:01:51 EST
GTK 3.12 is affected too.

See attachment https://bugs.eclipse.org/bugs/attachment.cgi?id=249690
EGit history view is unusable due this bug.

Same issue with libgtk-3 3.12.2-0ubuntu15.1 on Kubuntu 14.10 (dpkg -l | grep libgtk) on latest 4.5 head build. Could this issue be related to broken table rendering (see bug 446075) introduced via bug 427480 fix?
Comment 12 Steven Pehrson CLA 2015-01-27 14:08:20 EST
Similar issue using gtk 3.14.6-1.fc21.  In my case all the columns in the History view are completely blank.  I can still select a blank row to get the commit information. If the tree is short enough, I can make the tree/table visible again by expanding the history view until the scrollbar goes away. 

Switching to gtk2 fixes this problem, but makes push-buttons unusable because I'm using a dark theme but push buttons are still white, making the white text inside the button unreadable (which is why I switched to gtk3). Note that by default Fedora 21 ships with an eclipse.ini that forces gtk2 using the launcher.GTK_version flag.
Comment 13 Alexander Kurtakov CLA 2015-03-25 02:56:09 EDT
The fix for the garbled text fixes this one too.

*** This bug has been marked as a duplicate of bug 446075 ***