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

Bug 262971

Summary: SWT.EraseItem not sent in Linux as in Windows after Scrolling Event in Table
Product: [Eclipse Project] Platform Reporter: Hugo A. Garcia <hgarcia>
Component: SWTAssignee: Bogdan Gheorghe <gheorghe>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, ericwill, snorthov
Version: 3.4.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Snippet for verifying the bug none

Description Hugo A. Garcia CLA 2009-01-29 16:34:51 EST
Created attachment 124207 [details]
Snippet for verifying the bug

Build ID:  M20080911-1700

Steps To Reproduce:
Use Case:

You need to track the movement of a column in order to paint a widget that maintains the position above the column as the column is scrolled or resized.

Solution:

Capture the x coordinates of the column by using the coordinates provided in SWT.EraseItem.

Works in window but not in Linux.

Run the snippet, select and scroll the bar of the table.

Result: In Windows the EraseItem is sent after the scroll bar is selected and you can see the output of both Listeners while in Linux the EraseItem  event is not sent.

Running the application in Debug mode and setting a breakpoint on the ScrollBar listener reveals different call stacks in Windows. The difference in the call stacks is expected yet the sequence of SWT events sent is not the same. There are other bugs related to SWT.EraseItem and it seems that at least some of them could be fixed by just maling sure the events are thrown in the same order in both platforms, if posible.

Ohter bugs that could be related:

bug 138642
bug 183973
bug 8134
bug 169517
bug 133243



More information:
Comment 1 Felipe Heidrich CLA 2009-01-29 16:42:47 EST
Does 3.5 m5 have the same problem ?
Comment 2 Hugo A. Garcia CLA 2009-01-29 17:37:02 EST
Downloaded 3.5m4 for Windows and Linux. Ran snippet.

Same general behavior in 3.5m4 as in 3.4.1 in Linux. No SWT.EraseItem sent.

There are some new events thrown in Linux when a column is scrolled outside of the visible window with events ID of 484, 496, 494, 499 and others but dont know if this last bit matters or not.
Comment 3 Hugo A. Garcia CLA 2009-02-15 22:34:39 EST
Downloaded 3.5 m5; ran snipplet; not enough erase events thrown. Still not working.
Comment 4 Eric Williams CLA 2018-05-15 14:30:11 EDT
I can see both the EraseItem events and the scroll selection on GTK3.22, 4.8 M7, Fedora 28.