diff --git a/src/org/openstreetmap/josm/Main.java b/src/org/openstreetmap/josm/Main.java
index 004c3c5..2f47385 100644
|
a
|
b
|
abstract public class Main {
|
| 414 | 414 | // save the current window geometry |
| 415 | 415 | String curGeometryPref = pref.get("gui.geometry"); |
| 416 | 416 | if(curGeometryPref.length() != 0) { |
| | 417 | Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); |
| 417 | 418 | Rectangle bounds = parent.getBounds(); |
| 418 | | pref.put("gui.geometry", |
| 419 | | (int)bounds.getWidth() + |
| 420 | | "x" + (int)bounds.getHeight() + |
| 421 | | "+" + (int)bounds.getX() + |
| 422 | | "+" + (int)bounds.getY()); |
| | 419 | int width = (int)bounds.getWidth(); |
| | 420 | int height = (int)bounds.getHeight(); |
| | 421 | int x = (int)bounds.getX(); |
| | 422 | int y = (int)bounds.getY(); |
| | 423 | if(width > screenDimension.width) |
| | 424 | width = screenDimension.width; |
| | 425 | if(height > screenDimension.height) |
| | 426 | width = screenDimension.height; |
| | 427 | if(x < 0) |
| | 428 | x = 0; |
| | 429 | if(y < 0) |
| | 430 | y = 0; |
| | 431 | pref.put("gui.geometry", width + "x" + height + "+" + x + "+" + y); |
| 423 | 432 | } |
| 424 | 433 | } |
| 425 | 434 | } |
diff --git a/src/org/openstreetmap/josm/gui/MainApplication.java b/src/org/openstreetmap/josm/gui/MainApplication.java
index 5f5a5b9..2616afe 100644
|
a
|
b
|
public class MainApplication extends Main {
|
| 177 | 177 | mainFrame.setVisible(true); |
| 178 | 178 | splash.closeSplash(); |
| 179 | 179 | |
| 180 | | if (!args.containsKey("no-fullscreen") && !args.containsKey("geometry") && Main.pref.get("gui.geometry") == null && Toolkit.getDefaultToolkit().isFrameStateSupported(JFrame.MAXIMIZED_BOTH)) |
| | 180 | if (!args.containsKey("no-fullscreen") && !args.containsKey("geometry") && Main.pref.get("gui.geometry").length() == 0 && Toolkit.getDefaultToolkit().isFrameStateSupported(JFrame.MAXIMIZED_BOTH)) |
| 181 | 181 | mainFrame.setExtendedState(JFrame.MAXIMIZED_BOTH); |
| 182 | 182 | |
| 183 | 183 | EventQueue.invokeLater(new Runnable(){ |