Merge pull request #9270 from abextm/fully-off-containable

runelite-client: Don't try to contain to screen when contain is off
This commit is contained in:
Tomas Slusny
2019-07-05 20:30:19 +02:00
committed by GitHub

View File

@@ -113,9 +113,12 @@ public class ContainableFrame extends JFrame
if (forcedWidthIncrease || expandResizeType == ExpandResizeType.KEEP_GAME_SIZE)
{
final int newWindowWidth = getWidth() + increment;
int newWindowX = getX();
if (containedInScreen)
{
final Rectangle screenBounds = getGraphicsConfiguration().getBounds();
final boolean wouldExpandThroughEdge = getX() + newWindowWidth > screenBounds.getX() + screenBounds.getWidth();
int newWindowX = getX();
if (wouldExpandThroughEdge)
{
@@ -131,6 +134,7 @@ public class ContainableFrame extends JFrame
expandedClientOppositeDirection = true;
}
}
setBounds(newWindowX, getY(), newWindowWidth, getHeight());
}