Bug 574307

Summary: [GTK3] Autohiding scrollbar does not trigger redraw
Product: [Eclipse Project] Platform Reporter: Thomas Singer <ts-swt>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: jmajano, ts-swt
Version: 4.21   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Snippet to reproduce
none
Screenshot initially
none
Screenshot after the scrollbar automatically hid
none
Screenshot with scrollbar none

Description Thomas Singer CLA 2021-06-18 08:10:05 EDT
Please launch the attached snippet on Linux. It should show a right-aligned text and a vertical scrollbar. If there is an autohiding scrollbar, it can be shown by moving the mouse over the control. When moving it away, it will hide. Problem is, that the scrollbar is shown in front of the text, when hiding an empty area remains without redrawing.
Comment 1 Thomas Singer CLA 2021-06-18 08:27:02 EDT
Created attachment 286622 [details]
Snippet to reproduce
Comment 2 Thomas Singer CLA 2021-06-18 08:33:07 EDT
Created attachment 286623 [details]
Screenshot initially
Comment 3 Thomas Singer CLA 2021-06-18 08:36:42 EDT
Created attachment 286624 [details]
Screenshot after the scrollbar automatically hid
Comment 4 Thomas Singer CLA 2021-06-18 08:38:31 EDT
Created attachment 286625 [details]
Screenshot with scrollbar
Comment 5 Joel Majano CLA 2021-06-21 11:14:33 EDT
Reproduced the bug on my environment using the provided snippet, I will take a look at this. From a quick glance at the snippet, causing a redraw by means of resizing window brings back the string.
Comment 6 Joel Majano CLA 2021-06-21 11:56:02 EDT
The paint event that would redraw the part of the string that's cutoff is being discarded.

From this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=546248

If I comment out the 'return 0' which discards Paint events, the snippet works as intended. Of course, this would undo the work the bug was trying to achieve so I'll have to look into this more.