< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java
Print this page
@@ -44,10 +44,11 @@
// Set to true when we get the first ConfigureNotify after being
// reparented - indicates that WM has adopted the top-level.
boolean configure_seen;
boolean insets_corrected;
+ private boolean force_correct_insets = false;
XIconWindow iconWindow;
WindowDimensions dimensions;
XContentWindow content;
Insets currentInsets;
@@ -349,11 +350,11 @@
if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("wm-provided insets {0}", correctWM);
}
// If these insets are equal to our current insets - no actions are necessary
Insets dimInsets = dimensions.getInsets();
- if (correctWM.equals(dimInsets)) {
+ if (!force_correct_insets && correctWM.equals(dimInsets)) {
insLog.finer("Insets are the same as estimated - no additional reshapes necessary");
no_reparent_artifacts = true;
insets_corrected = true;
applyGuessedInsets();
return;
@@ -367,11 +368,11 @@
} else {
insLog.finer("correctWM insets are not available, waiting for configureNotify");
}
}
}
-
+ force_correct_insets = false;
if (correctWM != null) {
handleCorrectInsets(correctWM);
}
}
} finally {
@@ -957,10 +958,11 @@
public void setVisible(boolean vis) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
}
if (vis && !isVisible()) {
+ force_correct_insets = true;
XWM.setShellDecor(this);
super.setVisible(vis);
if (winAttr.isResizable) {
//Fix for 4320050: Minimum size for java.awt.Frame is not being enforced.
//We need to update frame's minimum size, not to reset it
< prev index next >