hack to ensure that if window geometry was not stored correctly, windows are not...
authorjprocter <Jim Procter>
Sun, 19 Sep 2010 16:34:58 +0000 (16:34 +0000)
committerjprocter <Jim Procter>
Sun, 19 Sep 2010 16:34:58 +0000 (16:34 +0000)
src/jalview/gui/Desktop.java

index 8531e04..cf89494 100755 (executable)
@@ -414,6 +414,14 @@ public class Desktop extends jalview.jbgui.GDesktop implements
         iw = (int) (iw * sw);
         iy = (int) (iy * sh);
         ih = (int) (ih * sh);
+        while (ix>=screenSize.width) {
+          jalview.bin.Cache.log.debug("Window geometry location recall error: shifting horizontal to within screenbounds.");
+          ix-=screenSize.width;
+        }
+        while (iy>=screenSize.height) {
+          jalview.bin.Cache.log.debug("Window geometry location recall error: shifting vertical to within screenbounds.");
+                    iy-=screenSize.height;
+        }
         jalview.bin.Cache.log.debug("Got last known dimensions for "
                 + windowName + ": x:" + ix + " y:" + iy + " width:" + iw
                 + " height:" + ih);