Skip to content

Commit

Permalink
empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rjolly committed Mar 14, 2019
1 parent 4cdf139 commit cdb1331
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions wm/src/linoleum/wm/WindowManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class WindowManager extends PreferenceSupport {
private final Map<Integer, WindowManager> frames = new HashMap<>();
private final Logger logger = Logger.getLogger(getClass().getName());
private boolean closed;
private boolean config;

// internal state
public static final int UNMANAGED = 0;
Expand Down Expand Up @@ -267,9 +266,13 @@ private void when_configure_notify(final ConfigureNotify event) {
}

private void configure(final Rectangle bounds) {
config = true;
setBounds(bounds.x - panel.getX(), bounds.y - panel.getY() - getContent().getY(), bounds.width - panel.getWidth() + getWidth(), bounds.height - panel.getHeight() + getHeight());
config = false;
final int x = bounds.x - panel.getX();
final int y = bounds.y - panel.getY() - getContent().getY();
final int width = bounds.width - panel.getWidth() + getWidth();
final int height = bounds.height - panel.getHeight() + getHeight();
if (x != getX() || y != getHeight() || width != getWidth() || height != getHeight()) {
setBounds(x, y, width, height);
}
}

private Container getContent() {
Expand Down Expand Up @@ -449,14 +452,14 @@ private void formInternalFrameIconified(javax.swing.event.InternalFrameEvent evt
}//GEN-LAST:event_formInternalFrameIconified

private void formComponentMoved(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentMoved
if (client != null && !config) {
if (client != null) {
client.move(getX() + panel.getX(), getY() + panel.getY() + getContent().getY());
getOwner().display.flush();
}
}//GEN-LAST:event_formComponentMoved

private void formComponentResized(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentResized
if (client != null && !config) {
if (client != null) {
client.resize(panel.getWidth(), panel.getHeight());
getOwner().display.flush();
}
Expand Down

0 comments on commit cdb1331

Please sign in to comment.