src/share/classes/javax/swing/Popup.java
Print this page
*** 225,240 ****
*/
static class HeavyWeightWindow extends JWindow implements ModalExclude {
HeavyWeightWindow(Window parent) {
super(parent);
setFocusableWindowState(false);
! Toolkit tk = Toolkit.getDefaultToolkit();
! if (tk instanceof SunToolkit) {
! // all the short-lived windows like Popups should be
! // OverrideRedirect on X11 platforms
! ((SunToolkit)tk).setOverrideRedirect(this);
! }
// Popups are typically transient and most likely won't benefit
// from true double buffering. Turn it off here.
getRootPane().setUseTrueDoubleBuffering(false);
// Try to set "always-on-top" for the popup window.
// Applets usually don't have sufficient permissions to do it.
--- 225,236 ----
*/
static class HeavyWeightWindow extends JWindow implements ModalExclude {
HeavyWeightWindow(Window parent) {
super(parent);
setFocusableWindowState(false);
! setType(Window.Type.POPUP);
!
// Popups are typically transient and most likely won't benefit
// from true double buffering. Turn it off here.
getRootPane().setUseTrueDoubleBuffering(false);
// Try to set "always-on-top" for the popup window.
// Applets usually don't have sufficient permissions to do it.