From 93a2c01bd04b073cc2c0829518405a40f5a9208e Mon Sep 17 00:00:00 2001 From: weisj Date: Sat, 4 Apr 2020 11:36:34 +0200 Subject: [PATCH] Avoid popup installation if decorations are disabled. --- .../com/github/weisj/darklaf/ui/DarkPopupFactory.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java b/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java index 0d6762c0..ad46e233 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java @@ -86,10 +86,12 @@ public class DarkPopupFactory extends PopupFactory { window.setFocusableWindowState(true); } - if (install) { - DecorationsHandler.getSharedInstance().installPopupWindow(window); - } else { - DecorationsHandler.getSharedInstance().uninstallPopupWindow(window); + if (DecorationsHandler.getSharedInstance().isCustomDecorationSupported()) { + if (install) { + DecorationsHandler.getSharedInstance().installPopupWindow(window); + } else { + DecorationsHandler.getSharedInstance().uninstallPopupWindow(window); + } } if (startHidden) { ((JComponent) contents).putClientProperty(DarkPopupMenuUI.KEY_MAKE_VISIBLE, true);