Bug 576690 - [Tree] PaintItem does not receive HOT flag if unset in EraseItem
Summary: [Tree] PaintItem does not receive HOT flag if unset in EraseItem
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-18 04:35 EDT by Thomas Singer CLA
Modified: 2021-10-19 13:28 EDT (History)
3 users (show)

See Also:


Attachments
Snippet to reproduce (2.63 KB, text/plain)
2021-10-18 04:35 EDT, Thomas Singer CLA
no flags Details
Screenshot on Windows 10 (5.61 KB, image/png)
2021-10-18 04:36 EDT, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2021-10-18 04:35:25 EDT
Please launch the attached snippet. It should show a tree with white background and dark foreground. Selected rows should have a yellow background and hovered cells a gray background with red foreground. To avoid the system to draw the hot-effect we have to unset the SWT.HOT flat in the EraseItem listener. Unfortunately, this also prevents the PaintItem from receiving this flag.
Comment 1 Thomas Singer CLA 2021-10-18 04:35:45 EDT
Created attachment 287327 [details]
Snippet to reproduce
Comment 2 Thomas Singer CLA 2021-10-18 04:36:52 EDT
Created attachment 287328 [details]
Screenshot on Windows 10
Comment 3 Rolf Theunissen CLA 2021-10-18 05:49:56 EDT
The hot flag of the item is removed in CDDS_ITEMPREPAINT, when ignoreDrawHot is true. 

Line 1160:
  if (explorerTheme) {
    if (selected || (hot && ignoreDrawHot)) nmcd.uItemState &= ~OS.CDIS_HOT;
    OS.MoveMemory (lParam, nmcd, NMTVCUSTOMDRAW.sizeof);
  }

When theses lines are commented out, the snipped seems to work. Though, don't have sufficient knowledge about the win32/swt API to fix this issue.