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

Bug 196572

Summary: Unify event order of MeasureItem and PaintItem events between different OS
Product: [Eclipse Project] Platform Reporter: Michael Chervil <michael.krkoska>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: ericwill, markus.kell.r, snorthov, tom.schindl
Version: 3.3Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Snippet to show the situation
none
Output of snippet on win32, carbon and gtk none

Description Michael Chervil CLA 2007-07-15 10:45:52 EDT
The order of MeasureItem and PaintItem events differs depending on the OS.

The attached Snippet shows the situation. I attached the output for win32, carbon and gtk.

When using owner draw on Table or Tree, sometimes the need arises to cache the results from MeasureItem to reuse it in PaintItem. A primitive caching strategy could assume, that the next event after a MeasureItem event is the corresponding PaintItem event. This is the case with win32 and carbon, but unfortunately not in gtk.

Is it possible to unify the order of the events, or is it determined by the WS?
Comment 1 Michael Chervil CLA 2007-07-15 10:46:26 EDT
Created attachment 73810 [details]
Snippet to show the situation
Comment 2 Michael Chervil CLA 2007-07-15 10:47:19 EDT
Created attachment 73811 [details]
Output of snippet on win32, carbon and gtk
Comment 3 Steve Northover CLA 2007-07-19 12:39:22 EDT
There might be something we can do but the operating system determines when the events are sent.
Comment 4 Eric Williams CLA 2018-09-10 13:54:56 EDT
Ultimately this is up to the OS, and trying to fix this will likely break things.