-
Bug
-
Resolution: Fixed
-
P3
-
7u51, 8, 9
-
b124
-
x86, x86_64
-
windows_7
Java Web Start app has at least two Event Dispatch Threads: for Java Console and for application itself, each associated with its own AppContext.
When user changes Windows themes (from Basic to Classic), updateAllUIs() is posted to EDT. It is done in DesktopProperty.updateUI(). Since DesktopProperty.updatePending flag is shared between EDT, only one updateAllUIs() event will be posted, thus UI will updated only in one of the EDTs.
Here's debug prints:
WToolkit.windowsSettingChange - directly
xpStyleEnabled = false
>>> WToolkit.updateProperties
scheduleUpdateUI:false - AWT-EventQueue-1
Scheduling UI update - AWT-EventQueue-1
scheduleUpdateUI:true - AWT-EventQueue-2
It looks as if DesktopProperty.updatePending flag should be part of AppContext.
My build includes the fixes for JDK-8042590 andJDK-8039383. Yet the issue is reproduced without those fixes.
Steps to reproduce:
1. Enable Java Console in Java Control Panel:
- Click Advanced tab,
- Select Show Console,
- Click OK to apply the changes and close JCP.
2. Start any javaws app that uses Windows Look-and-Feel or which allows changing LaF. (I used SwingSet3.)
3. Change Windows theme from visual styles-enabled (Aero or Basic) to Classic one.
4. You will see the UI correctly updated either in Java Console or in the application.
When user changes Windows themes (from Basic to Classic), updateAllUIs() is posted to EDT. It is done in DesktopProperty.updateUI(). Since DesktopProperty.updatePending flag is shared between EDT, only one updateAllUIs() event will be posted, thus UI will updated only in one of the EDTs.
Here's debug prints:
WToolkit.windowsSettingChange - directly
xpStyleEnabled = false
>>> WToolkit.updateProperties
scheduleUpdateUI:false - AWT-EventQueue-1
Scheduling UI update - AWT-EventQueue-1
scheduleUpdateUI:true - AWT-EventQueue-2
It looks as if DesktopProperty.updatePending flag should be part of AppContext.
My build includes the fixes for JDK-8042590 and
Steps to reproduce:
1. Enable Java Console in Java Control Panel:
- Click Advanced tab,
- Select Show Console,
- Click OK to apply the changes and close JCP.
2. Start any javaws app that uses Windows Look-and-Feel or which allows changing LaF. (I used SwingSet3.)
3. Change Windows theme from visual styles-enabled (Aero or Basic) to Classic one.
4. You will see the UI correctly updated either in Java Console or in the application.