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

Bug 535657

Summary: [GTK 3.22] Combo overlaps with label on resize
Product: [Eclipse Project] Platform Reporter: Simeon Andreev <simeon.danailov.andreev>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: ericwill, loskutov
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500703
https://bugs.eclipse.org/bugs/show_bug.cgi?id=539367
Whiteboard:
Attachments:
Description Flags
SWT snippet to reproduce the problem with. Shrink shell width to observe the problem.
none
OK behaviour seen with the snippet on GTK 3.14.
none
Bad behaviour seen with the snippet on GTK 3.22. none

Description Simeon Andreev CLA 2018-06-07 12:01:59 EDT
Created attachment 274378 [details]
SWT snippet to reproduce the problem with. Shrink shell width to observe the problem.

To reproduce:

1. Run snippet "BugComboOverlapsWithLabelOnResize.java"
2. Reduce shell width by resizing with the mouse.
3. Observe combos overlapping with labels.

Behaviour is nearly fixed, by changing line 41 in the snippet:

- GridLayout gridLayout = new GridLayout(2, false);
+ GridLayout gridLayout = new GridLayout(2, true);

I.e. request equal column sizes in the group. There is still minor issue with the longer combo (middle combo), namely the left end gets cut off. But this is not dramatic.

Seen with:

Eclipse SDK
Version: Photon (4.8)
Build id: I20180531-0700

RHEL 7.4
GTK 3.22.10


GTK 3.14.13 seems to be fine.
Comment 1 Simeon Andreev CLA 2018-06-07 12:03:48 EDT
Created attachment 274379 [details]
OK behaviour seen with the snippet on GTK 3.14.
Comment 2 Simeon Andreev CLA 2018-06-07 12:05:12 EDT
Created attachment 274380 [details]
Bad behaviour seen with the snippet on GTK 3.22.

I also observe the unwanted behaviour with Adwaita (GTK 3.22). The attached gifs are taken with Clearlooks Phenix theme though.
Comment 3 Eric Williams CLA 2018-06-07 12:07:26 EDT
Interesting, looks like some bugs made it after the fixes for bug 500703.
Comment 4 Eric Williams CLA 2018-06-07 12:07:41 EDT
I'll investigate.
Comment 5 Eric Williams CLA 2018-06-07 12:12:23 EDT
Just out of curiosity, does the issue reproduce when using a Combo that *does not* have SWT.READ_ONLY specified?
Comment 6 Simeon Andreev CLA 2018-06-08 02:12:19 EDT
(In reply to Eric Williams from comment #5)
> Just out of curiosity, does the issue reproduce when using a Combo that
> *does not* have SWT.READ_ONLY specified?

Not that I see, at least for the part of our product for which we received a report and in the attached snippet.

Thank for checking this!
Comment 7 Simeon Andreev CLA 2018-06-11 08:07:39 EDT
Hi Eric,

I've put some debug outputs in Composite.fixChildClippings(), to check when the fix is applied. After shrinking the attached snippet enough to apply the negative clipping fix from bug 500703, I see *constant and endless* redraws.

Is this really intended?

Best regards,
Simeon
Comment 8 Eric Williams CLA 2018-06-11 09:56:11 EDT
(In reply to Simeon Andreev from comment #7)
> Hi Eric,
> 
> I've put some debug outputs in Composite.fixChildClippings(), to check when
> the fix is applied. After shrinking the attached snippet enough to apply the
> negative clipping fix from bug 500703, I see *constant and endless* redraws.
> 
> Is this really intended?
> 
> Best regards,
> Simeon

Yes, it's necessary unfortunately -- as of GTK3.20 the drawing model changed (again). We have to fix the clippings of all the Combo's children in order to make sure nothing is overdrawn. If I find a better solution I'll implement it but this is all I have found to work so far.
Comment 9 Andrey Loskutov CLA 2018-06-11 10:59:39 EDT
(In reply to Eric Williams from comment #8)
> Yes, it's necessary unfortunately -- as of GTK3.20 the drawing model changed
> (again).

:-)
Comment 10 Eric Williams CLA 2018-06-12 16:23:26 EDT
The root cause of this bug is the same as bug 535323.

*** This bug has been marked as a duplicate of bug 535323 ***
Comment 11 Simeon Andreev CLA 2018-06-13 02:06:30 EDT
Thanks!