Bug 578025 - SWT.Skin event sent in wrong order (child before parent)
Summary: SWT.Skin event sent in wrong order (child before parent)
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: 2022-01-03 08:20 EST by Thomas Singer CLA
Modified: 2022-01-03 08:33 EST (History)
1 user (show)

See Also:


Attachments
Snippet to reproduce (1.37 KB, text/plain)
2022-01-03 08:20 EST, Thomas Singer CLA
no flags Details
Screenshot on Windows 10 (5.27 KB, image/png)
2022-01-03 08:23 EST, 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 2022-01-03 08:20:20 EST
Please run the attached snippet. It set's the shell colors to gray/yellow and all other controls inherit that. But the Label shows the wrong (initial) colors.
Comment 1 Thomas Singer CLA 2022-01-03 08:20:48 EST
Created attachment 287767 [details]
Snippet to reproduce
Comment 2 Thomas Singer CLA 2022-01-03 08:23:28 EST
Created attachment 287768 [details]
Screenshot on Windows 10

The logged order of the SWT.Skin events is

class org.eclipse.swt.widgets.Shell
class org.eclipse.swt.widgets.Composite
class org.eclipse.swt.widgets.Label
class org.eclipse.swt.widgets.Composite

The events are sent simply in the order in which the widgets were created. Invoking

  newParent.reskin(SWT.ALL);

after setting the new parent does not change it.
Comment 3 Eclipse Genie CLA 2022-01-03 08:32:10 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/189232
Comment 4 Thomas Singer CLA 2022-01-03 08:33:15 EST
I'm not sure whether

  display.asyncExec(() -> newParent.reskin(SWT.ALL));

is the right choice to fix it, or the sent patch (it's only for Windows and meant for discussing base).