clientui: reset frame position in safe mode
This commit is contained in:
@@ -48,6 +48,7 @@ import java.awt.image.BufferedImage;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
import javax.inject.Provider;
|
import javax.inject.Provider;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import javax.swing.BoxLayout;
|
import javax.swing.BoxLayout;
|
||||||
@@ -122,6 +123,7 @@ public class ClientUI
|
|||||||
private final ConfigManager configManager;
|
private final ConfigManager configManager;
|
||||||
private final Provider<ClientThread> clientThreadProvider;
|
private final Provider<ClientThread> clientThreadProvider;
|
||||||
private final EventBus eventBus;
|
private final EventBus eventBus;
|
||||||
|
private final boolean safeMode;
|
||||||
|
|
||||||
private final CardLayout cardLayout = new CardLayout();
|
private final CardLayout cardLayout = new CardLayout();
|
||||||
private final Rectangle sidebarButtonPosition = new Rectangle();
|
private final Rectangle sidebarButtonPosition = new Rectangle();
|
||||||
@@ -150,7 +152,8 @@ public class ClientUI
|
|||||||
@Nullable Applet client,
|
@Nullable Applet client,
|
||||||
ConfigManager configManager,
|
ConfigManager configManager,
|
||||||
Provider<ClientThread> clientThreadProvider,
|
Provider<ClientThread> clientThreadProvider,
|
||||||
EventBus eventBus)
|
EventBus eventBus,
|
||||||
|
@Named("safeMode") boolean safeMode)
|
||||||
{
|
{
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.keyManager = keyManager;
|
this.keyManager = keyManager;
|
||||||
@@ -159,6 +162,7 @@ public class ClientUI
|
|||||||
this.configManager = configManager;
|
this.configManager = configManager;
|
||||||
this.clientThreadProvider = clientThreadProvider;
|
this.clientThreadProvider = clientThreadProvider;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
this.safeMode = safeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -507,7 +511,7 @@ public class ClientUI
|
|||||||
trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame);
|
trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame);
|
||||||
|
|
||||||
// Move frame around (needs to be done after frame is packed)
|
// Move frame around (needs to be done after frame is packed)
|
||||||
if (config.rememberScreenBounds())
|
if (config.rememberScreenBounds() && !safeMode)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user