Bug 571256

Summary: [win32] Incorrect client area on hiding scrollbar
Product: [Eclipse Project] Platform Reporter: Dirk Fauth <dirk.fauth>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: loskutov
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Dirk Fauth CLA 2021-02-17 09:23:04 EST
In NatTable we have a feature to specify the table column widths by percentage. It is also possible to have a mixed definition of fixed and percentage sized columns.

In a mixed setup, you can extend the client area which makes the vertical scrollbar visible. Reducing a column width hides the scrollbar. But I noticed that the client area is incorrect in that case, as it takes the vertical scrollbar width into account, although it was never visible.

The issue seems to be related to ScrollBar#setVisible(). Even setting the scrollbar to visible=false, it will make the scrollbars first visible. This triggers a resize event with the incorrect client area dimensions. But there is no resize event fired afterwards when the scrollbars are hidden again.

As a result we are not able to fill the whole vertical space once the horizontal scrollbar is hidden, as the resize event is fired while the scrollbar is temporarily visible, and there is no resize event once it is hidden as it was intended by the call.

The comment in the code says it was a workaround for some strange behavior on Windows 7. Not sure if this workaround is still needed to make both scrollbars visible before hiding them.
Comment 1 Andrey Loskutov CLA 2021-02-17 10:47:17 EST
Patch?
Comment 2 Dirk Fauth CLA 2021-02-17 11:57:49 EST
(In reply to Andrey Loskutov from comment #1)
> Patch?

Are you asking me for a patch? 

Sorry, but the SWT code is nothing I understand. I don't understand the native stuff nor do I understand the implications of possible changes on other operating systems. 

So no, I can't provide a patch that would be in any way satisfying.