From c3ce5cc2a98740060df3f7188eed70b97e3abeda Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 27 Jul 2010 03:27:07 +0000 Subject: [PATCH] Fix for bug where on first installation, the Getdown window is sometimes much smaller than the background image. If we're going to change the preferred size of the StatusPanel, we have to invalidate it so that Window.pack knows to recompute the bounds. The reason this worked sometimes (or even most of the time) is that there's a race condition between the Getdown thread and the AWT thread: sometimes the real interface bits (_ifc) are in place by the time initInterface is first called, sometimes not. For the sake of consistency, we should probably fix that, but for now it's not a big deal: the backgroundless interface is rarely visible. --- src/java/com/threerings/getdown/launcher/StatusPanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/java/com/threerings/getdown/launcher/StatusPanel.java b/src/java/com/threerings/getdown/launcher/StatusPanel.java index cf0e971..417bae2 100644 --- a/src/java/com/threerings/getdown/launcher/StatusPanel.java +++ b/src/java/com/threerings/getdown/launcher/StatusPanel.java @@ -69,6 +69,7 @@ public class StatusPanel extends JComponent _psize = new Dimension(img.getWidth(null), img.getHeight(null)); } _barimg = barimg; + invalidate(); } /**