diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2016-05-29 13:57:56 +0200 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2016-05-29 13:57:56 +0200 |
commit | 6989eab74ebb5c4eb3a26b5d68fc69f8ecc8d782 (patch) | |
tree | c34e47cc59df9883d8e0ddbc6399c2a14f56ac4f /src | |
parent | d258eaf5fdf8cff44675b690f5586f8abf13e878 (diff) | |
download | jitsi-6989eab74ebb5c4eb3a26b5d68fc69f8ecc8d782.zip jitsi-6989eab74ebb5c4eb3a26b5d68fc69f8ecc8d782.tar.gz jitsi-6989eab74ebb5c4eb3a26b5d68fc69f8ecc8d782.tar.bz2 |
Check if the systray is initialized before hiding the main frame
Diffstat (limited to 'src')
3 files changed, 10 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java index a8ee80a..fb7e01c 100644 --- a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java +++ b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java @@ -1920,7 +1920,8 @@ public class MainFrame // On Mac systems the application is not quited on window close, so we // don't need to warn the user. if (!GuiActivator.getUIService().getExitOnMainWindowClose() - && !OSUtils.IS_MAC) + && !OSUtils.IS_MAC + && GuiActivator.getSystrayService().checkInitialized()) { SwingUtilities.invokeLater(new Runnable() { diff --git a/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java b/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java index f774b23..94e6307 100644 --- a/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java +++ b/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java @@ -469,7 +469,8 @@ public class SystrayServiceJdicImpl } } - private boolean checkInitialized() + @Override + public boolean checkInitialized() { if (!initialized) logger.error("Systray not init"); diff --git a/src/net/java/sip/communicator/service/systray/SystrayService.java b/src/net/java/sip/communicator/service/systray/SystrayService.java index b9ada84..751abc6 100644 --- a/src/net/java/sip/communicator/service/systray/SystrayService.java +++ b/src/net/java/sip/communicator/service/systray/SystrayService.java @@ -129,4 +129,10 @@ public interface SystrayService * Selects the best available popup message handler */ public void selectBestPopupMessageHandler(); + + /** + * Checks if the systray icon has been initialized. + * @return True if the systray is initialized, false otherwise. + */ + public boolean checkInitialized(); } |