Merge pull request #1135 from JustANull/tray-icon-crash

Fix tray icon crash when clicked quickly on start
This commit is contained in:
Tomas Slusny
2018-03-28 14:02:46 +02:00
committed by GitHub

View File

@@ -301,8 +301,6 @@ public class ClientUI
// Try to enable fullscreen on OSX
OSXUtil.tryEnableFullscreen(frame);
trayIcon = SwingUtil.createTrayIcon(ICON, properties.getTitle(), frame);
frame.setTitle(properties.getTitle());
frame.setIconImage(ICON);
frame.getLayeredPane().setCursor(Cursor.getDefaultCursor()); // Prevent substance from using a resize cursor for pointing
@@ -399,6 +397,8 @@ public class ClientUI
frame.toFront();
requestFocus();
giveClientFocus();
trayIcon = SwingUtil.createTrayIcon(ICON, properties.getTitle(), frame);
});
eventBus.post(new ClientUILoaded());