demitriusbelai commented on code in PR #6391:
URL: https://github.com/apache/netbeans/pull/6391#discussion_r1324624261
##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLafOptionsPanelController.java:
##########
@@ -75,9 +81,33 @@ public void applyChanges() {
FlatLFCustoms.updateUnifiedBackground();
- if (oldUseWindowDecorations !=
FlatLafPrefs.isUseWindowDecorations()) {
-
FlatLaf.setUseNativeWindowDecorations(FlatLafPrefs.isUseWindowDecorations());
- }
+ boolean isUseWindowDecorations =
FlatLafPrefs.isUseWindowDecorations();
+ if (oldUseWindowDecorations != isUseWindowDecorations) {
+ if (FlatLaf.supportsNativeWindowDecorations()) {
+
FlatLaf.setUseNativeWindowDecorations(isUseWindowDecorations);
+ } else {
+
JFrame.setDefaultLookAndFeelDecorated(isUseWindowDecorations);
Review Comment:
> This complicated code runs only if the setting is changed from the Options
dialog while NetBeans is running, right?
Yes.
> So if there are bugs, they will go away when NetBeans is restarted?
Yes.
I know that it looks like a ugly hack. If you want this removed I do not
mind. We can restart NetBeans to activate/deactivate the window decoration
anyway.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists