Some platform preference changes can trigger the emission of redundant notifications. For example, when switching from a high-contrast theme on Windows to the regular theme, the following notifications are emitted:
Notification 1:
Windows.UIColor.Accent=0x0078d4ff
Windows.SysColor.COLOR_HIGHLIGHTTEXT=0xffffffff
Windows.SysColor.COLOR_WINDOW=0xffffffff
Windows.UIColor.AccentLight1=0x0091f8ff
Windows.SysColor.COLOR_3DFACE=0xf0f0f0ff
Windows.SysColor.COLOR_HOTLIGHT=0x0066ccff
Windows.SysColor.COLOR_WINDOWTEXT=0x000000ff
Windows.SysColor.COLOR_BTNTEXT=0x000000ff
Windows.UIColor.Foreground=0x000000ff
Windows.UIColor.AccentDark1=0x0067c0ff
Windows.UIColor.Background=0xffffffff
Windows.UIColor.AccentLight3=0x99ebffff
Windows.UIColor.AccentLight2=0x4cc2ffff
Windows.SysColor.COLOR_GRAYTEXT=0x6d6d6dff
Windows.SysColor.COLOR_HIGHLIGHT=0x0078d7ff
Windows.UIColor.AccentDark2=0x003e92ff
Windows.UIColor.AccentDark3=0x001a68ff
Notification 2:
-Windows.SPI.HighContrastColorScheme
Windows.SPI.HighContrast=false
Notification 3:
Windows.UIColor.Foreground=0xffffffff
Windows.UIColor.Background=0x000000ff
Notably, the values for Windows.UIColor.Foreground/Background are inconsistent between the notifications (although they are eventually correct). In general, only a single notification should be emitted that includes all of the changed preferences.
Notification 1:
Windows.UIColor.Accent=0x0078d4ff
Windows.SysColor.COLOR_HIGHLIGHTTEXT=0xffffffff
Windows.SysColor.COLOR_WINDOW=0xffffffff
Windows.UIColor.AccentLight1=0x0091f8ff
Windows.SysColor.COLOR_3DFACE=0xf0f0f0ff
Windows.SysColor.COLOR_HOTLIGHT=0x0066ccff
Windows.SysColor.COLOR_WINDOWTEXT=0x000000ff
Windows.SysColor.COLOR_BTNTEXT=0x000000ff
Windows.UIColor.Foreground=0x000000ff
Windows.UIColor.AccentDark1=0x0067c0ff
Windows.UIColor.Background=0xffffffff
Windows.UIColor.AccentLight3=0x99ebffff
Windows.UIColor.AccentLight2=0x4cc2ffff
Windows.SysColor.COLOR_GRAYTEXT=0x6d6d6dff
Windows.SysColor.COLOR_HIGHLIGHT=0x0078d7ff
Windows.UIColor.AccentDark2=0x003e92ff
Windows.UIColor.AccentDark3=0x001a68ff
Notification 2:
-Windows.SPI.HighContrastColorScheme
Windows.SPI.HighContrast=false
Notification 3:
Windows.UIColor.Foreground=0xffffffff
Windows.UIColor.Background=0x000000ff
Notably, the values for Windows.UIColor.Foreground/Background are inconsistent between the notifications (although they are eventually correct). In general, only a single notification should be emitted that includes all of the changed preferences.
- links to
-
Review(master) openjdk/jfx/1810