Fix window positioning code

fix-message-formatting 5227
njb 12 years ago committed by Ingo Bauersachs
parent 767cb91dc3
commit 2add59b51b

@ -51,14 +51,14 @@ public static boolean isTitleOnScreen(Rectangle window)
boolean leftInside = false;
boolean rightInside = false;
Point left = new Point(window.x, window.y);
Point right = new Point(window.x, window.y + window.width);
Point topLeft = new Point(window.x, window.y);
Point topRight = new Point(window.x + window.width, window.y);
for(GraphicsDevice gd : ge.getScreenDevices())
{
GraphicsConfiguration gc = gd.getDefaultConfiguration();
if(gc.getBounds().contains(left))
if(gc.getBounds().contains(topLeft))
leftInside = true;
if(gc.getBounds().contains(right))
if(gc.getBounds().contains(topRight))
rightInside = true;
if(leftInside && rightInside)
return true;

Loading…
Cancel
Save