mgarin / weblaf

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
http://weblookandfeel.com
GNU General Public License v3.0
1.13k stars 234 forks source link

Decorated dialog can't restore #642

Closed charghet closed 3 years ago

charghet commented 3 years ago

java 1.8.0 u221 windows10 I restore the demo when I show a decorated dialog from the demo and minimize the demo, but the decorated dialog can not visit and I can't press the second "show dialog" button, it seems that the decorated dialog has been hidden. I use a screenshot software can see the hidden decorated dialog. The basic dialog won't be like this. image

mgarin commented 3 years ago

Thanks for reporting this! I was able to reproduce it on 1.8.0 u221 and also latest 1.8.9 u251.

That being said - it's doesn't appear on 1.8.0 u171 and earlier, as well as on any 9+ version. So it seems that something broke in later 1.8.0 updates specifically, i'll investigate and fix this.

mgarin commented 3 years ago

Also, unrelated but - something is wrong with fonts in the demo on your screenshot. Is it some custom font you're using for Windows UI? - in that case it might simply be using that If not - then this might also be some other issue.

charghet commented 3 years ago

I never set the system font. Maybe the default font is different.

mgarin commented 3 years ago

But is the demo text font the same as you see in other system windows/applications?

charghet commented 3 years ago

yeah, it's same.

mgarin commented 3 years ago

Alright, then it's the native font. Just never saw that font ever being default on Windows 10.

mgarin commented 3 years ago

Regarding the original issue - After some further digging I found that the same issue appears with any L&F and seems to be JDK-related: https://bugs.openjdk.java.net/browse/JDK-8187603

I have also tried to reproduced it again after recent changes and it doesn't seem to happen for on WebLaF demo anymore, but it does happen on the example from the bug report I've linked above. This is certainly something system/JDK-related and I don't think I'll be able to fix this in WebLaF anyhow.

I'll keep this issue open, but will move it to JDK-related project and tag it appropriately.

mgarin commented 3 years ago

In fact, I'll be closing it since it was mentioned in the issue that it doesn't appear on Java 9 or later and won't be fixed in 7/8 versions. For those, as explained in the linked issue, you can simply hide the dialog whenever frame is minimized to avoid this bug. Although this isn't something I would want to add in WebLaF code as it might negatively affect other library users.