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

Bug 563345

Summary: CTabRendering square tabs can disappear.
Product: [Eclipse Project] Platform Reporter: Mike Marchand <mmarchand>
Component: UIAssignee: Mike Marchand <mmarchand>
Status: VERIFIED FIXED QA Contact: Niraj Modi <niraj.modi>
Severity: normal    
Priority: P3 CC: aobuchow, harald, Lars.Vogel, mat.booth, niraj.modi
Version: 4.16   
Target Milestone: 4.16 M3   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/163238
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7ab3a188e4ad01fd89986130757a760fa4f6a7cc
Whiteboard:
Bug Depends on:    
Bug Blocks: 538740    

Description Mike Marchand CLA 2020-05-19 09:17:14 EDT
I am currently investigating a bug where the new square tabs can disappear when hovering over.

1. In the editor pane, open up 4 tabs.
2. Select the first tab.
3. Mouse over the second tab.
4. Move the mouse from the second tab into the third tab.  The text on the third tab will disappear, it will not be drawn hot.

There is a similar issue reported for round tabs, but it's much more difficult to reproduce, with square tabs, the issue reproduces much more easily.
Comment 1 Mike Marchand CLA 2020-05-19 10:13:22 EDT
The solution here was was simpler than I was originally thinking it might be.  The reason the tabs were disappearing is that the clipping rect was set to 0 width 0 height.

In the case of the round tabs, we always set the clipping rect ourselves coming into the function and cleared it going out of the function.  So in the square tabs, we now clear the clipping rectangle and everything works as expected again.


The issue I mentioned earlier that is similar is bug 428697.  It seems likely that bug is also caused by a clipping problem.

Gerrit with the fix for square tabs disappearing incoming.
Comment 2 Eclipse Genie CLA 2020-05-19 10:14:59 EDT
New Gerrit change created: https://git.eclipse.org/r/163238
Comment 3 Mike Marchand CLA 2020-05-21 06:57:58 EDT
*** Bug 563423 has been marked as a duplicate of this bug. ***
Comment 4 Niraj Modi CLA 2020-05-21 07:02:14 EDT
*** Bug 563423 has been marked as a duplicate of this bug. ***
Comment 5 Mat Booth CLA 2020-05-21 08:59:02 EDT
I don't see this on Linux, is the problem Windows only?
Comment 6 Mike Marchand CLA 2020-05-21 09:16:36 EDT
I'm not sure where the clip rect is being set in the first place.  In this case, I didn't root-cause the issue.  

My fix was to do the same thing for square as round since round tabs don't exhibit this problem (mostly... see bug 428697).
Comment 7 Mike Marchand CLA 2020-05-21 09:17:47 EDT
Niraj?  Would you be able to test the Gerrit?
Comment 8 Mat Booth CLA 2020-05-21 09:36:50 EDT
(In reply to Mat Booth from comment #5)
> I don't see this on Linux, is the problem Windows only?

Luckily I had a Windows 10 VM, where I do now see the problem.

I'm testing the fix
Comment 10 Mat Booth CLA 2020-05-21 10:00:36 EDT
(In reply to Mat Booth from comment #8)
> (In reply to Mat Booth from comment #5)
> > I don't see this on Linux, is the problem Windows only?
> 
> Luckily I had a Windows 10 VM, where I do now see the problem.
> 
> I'm testing the fix

Looks good to me, I confirm this fixes it on Windows 10 and I checked Linux/GTK too and seems to be no adverse side-effects.
Comment 11 Andrew Obuchowicz CLA 2020-05-21 11:33:57 EDT
Great work Mike! :)
Comment 12 Niraj Modi CLA 2020-05-22 02:03:33 EDT
Verified in Build id: I20200521-1000 on Win10.
Comment 13 Harald Loehnert CLA 2021-10-28 09:21:01 EDT
I got the same problem in version 4.21 now, regardless of whether round or square tabs.