< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java
Print this page
*** 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 >