< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 172,202 ****
SunToolkit.awtUnlock();
}
cachedFocusableWindow = isFocusableWindow();
! Font f = target.getFont();
! if (f == null) {
! f = XWindow.getDefaultFont();
! target.setFont(f);
// we should not call setFont because it will call a repaint
// which the peer may not be ready to do yet.
}
! Color c = target.getBackground();
! if (c == null) {
! Color background = SystemColor.window;
! target.setBackground(background);
// we should not call setBackGround because it will call a repaint
// which the peer may not be ready to do yet.
}
! c = target.getForeground();
! if (c == null) {
target.setForeground(SystemColor.windowText);
// we should not call setForeGround because it will call a repaint
// which the peer may not be ready to do yet.
}
alwaysOnTop = ((Window)target).isAlwaysOnTop() && ((Window)target).isAlwaysOnTopSupported();
GraphicsConfiguration gc = getGraphicsConfiguration();
((X11GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this);
}
--- 172,199 ----
SunToolkit.awtUnlock();
}
cachedFocusableWindow = isFocusableWindow();
! if (!target.isFontSet()) {
! target.setFont(XWindow.getDefaultFont());
// we should not call setFont because it will call a repaint
// which the peer may not be ready to do yet.
}
! if (!target.isBackgroundSet()) {
! target.setBackground(SystemColor.window);
// we should not call setBackGround because it will call a repaint
// which the peer may not be ready to do yet.
+
}
! if (!target.isForegroundSet()) {
target.setForeground(SystemColor.windowText);
// we should not call setForeGround because it will call a repaint
// which the peer may not be ready to do yet.
}
+
alwaysOnTop = ((Window)target).isAlwaysOnTop() && ((Window)target).isAlwaysOnTopSupported();
GraphicsConfiguration gc = getGraphicsConfiguration();
((X11GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this);
}
< prev index next >