diff options
author | Alexey Ushakov <alexey.ushakov@jetbrains.com> | 2018-03-29 22:26:31 +0300 |
---|---|---|
committer | Denis Fokin <denis.fokin@jetbrains.com> | 2018-04-26 16:45:34 +0300 |
commit | 0683560cfcdf37a536b3b6bf133c52dddc0b1ebd (patch) | |
tree | 368b648f241b26f1af538dd995aac707e5cc27ac | |
parent | 86699774b8eefa2198d53591bf43bbdc65564091 (diff) | |
download | jdk8u_jdk-0683560cfcdf37a536b3b6bf133c52dddc0b1ebd.tar.gz |
JRE-709 Transient windows have title bars (and other window decorations)
Restored setting POPUP window type under conditional option jbre.popupwindow.settype
(cherry picked from commit 74ba08b)
-rw-r--r-- | src/share/classes/javax/swing/Popup.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/share/classes/javax/swing/Popup.java b/src/share/classes/javax/swing/Popup.java index 2a5b1ab3d6..f98564df32 100644 --- a/src/share/classes/javax/swing/Popup.java +++ b/src/share/classes/javax/swing/Popup.java @@ -26,6 +26,8 @@ package javax.swing; import java.awt.*; +import java.security.AccessController; +import java.security.PrivilegedAction; import sun.awt.ModalExclude; import sun.awt.SunToolkit; @@ -232,7 +234,12 @@ public class Popup { HeavyWeightWindow(Window parent) { super(parent); setFocusableWindowState(false); -// setType(Window.Type.POPUP); + + if (AccessController.doPrivileged( + (PrivilegedAction<Boolean>) () -> + System.getProperty("jbre.popupwindow.settype") != null)) { + setType(Window.Type.POPUP); + } // Popups are typically transient and most likely won't benefit // from true double buffering. Turn it off here. |