Move system tray icon to be created before the client requests focus

This commit is contained in:
AWarbear
2018-05-09 02:19:04 +03:00
committed by Adam
parent 5658e34426
commit e9b37c7236

View File

@@ -470,6 +470,8 @@ public class ClientUI
frame.setLocationRelativeTo(frame.getOwner()); frame.setLocationRelativeTo(frame.getOwner());
} }
trayIcon = SwingUtil.createTrayIcon(ICON, properties.getTitle(), frame);
frame.setVisible(true); frame.setVisible(true);
frame.toFront(); frame.toFront();
requestFocus(); requestFocus();
@@ -488,8 +490,6 @@ public class ClientUI
frame.setLocationRelativeTo(frame.getOwner()); frame.setLocationRelativeTo(frame.getOwner());
} }
trayIcon = SwingUtil.createTrayIcon(ICON, properties.getTitle(), frame);
// Create hide sidebar button // Create hide sidebar button
sidebarNavigationButton = NavigationButton sidebarNavigationButton = NavigationButton
.builder() .builder()