Limit only overlays that are not snapped

Limit only overlays that are layoutable/moveable but not in snap corner.

Closes #7087

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-01-25 17:32:01 +01:00
parent 93e4d13c31
commit a474fd720f

View File

@@ -237,11 +237,11 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
{ {
location.setLocation(preferredLocation); location.setLocation(preferredLocation);
} }
}
final Dimension realDimensions = client.getRealDimensions(); final Dimension realDimensions = client.getRealDimensions();
location.x = Ints.constrainToRange(location.x, 0, realDimensions.width - dimension.width); location.x = Ints.constrainToRange(location.x, 0, realDimensions.width - dimension.width);
location.y = Ints.constrainToRange(location.y, 0, realDimensions.height - dimension.height); location.y = Ints.constrainToRange(location.y, 0, realDimensions.height - dimension.height);
}
if (overlay.getPreferredSize() != null) if (overlay.getPreferredSize() != null)
{ {