Ticket #16410: WindowGeometry.java.patch
File WindowGeometry.java.patch, 1.5 KB (added by , 6 years ago) |
---|
-
src/org/openstreetmap/josm/gui/util/WindowGeometry.java
343 343 344 344 // Ensure window does not hide taskbar 345 345 346 Rectangle maxbounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); 346 try { 347 Rectangle maxbounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); 347 348 348 if (!isBugInMaximumWindowBounds(maxbounds)) {349 deltax = size.width - maxbounds.width;350 if (deltax > 0) {351 size.width -= deltax;352 }349 if (!isBugInMaximumWindowBounds(maxbounds)) { 350 deltax = size.width - maxbounds.width; 351 if (deltax > 0) { 352 size.width -= deltax; 353 } 353 354 354 deltay = size.height - maxbounds.height; 355 if (deltay > 0) { 356 size.height -= deltay; 355 deltay = size.height - maxbounds.height; 356 if (deltay > 0) { 357 size.height -= deltay; 358 } 357 359 } 360 } catch (IllegalArgumentException e) { 361 // becaus of bug #16410 362 Logging.debug(e.toString()); 358 363 } 359 364 window.setLocation(p); 360 365 window.setSize(size);