mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Check tray support everytime
This commit is contained in:
parent
86e15cb6f2
commit
404cd744b2
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ import javafx.application.Platform;
|
|||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.awt.*;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
|
||||
|
@ -32,6 +33,11 @@ public class AppTray {
|
|||
|
||||
@SneakyThrows
|
||||
public void show() {
|
||||
// Even though we check at startup, it seems like the support can change at runtime
|
||||
if (!SystemTray.isSupported()) {
|
||||
return;
|
||||
}
|
||||
|
||||
icon.show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue