mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Fix macos quit not working
This commit is contained in:
parent
68895cfb55
commit
700f539dfb
1 changed files with 10 additions and 0 deletions
|
@ -65,6 +65,16 @@ public enum PlatformState {
|
|||
return Optional.empty();
|
||||
}
|
||||
|
||||
try {
|
||||
// Weird fix to ensure that macOS quit operation works while in tray.
|
||||
// Maybe related to https://bugs.openjdk.org/browse/JDK-8318129 as it prints the same error if not called
|
||||
// The headless is not needed though but still done
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
|
||||
} catch (HeadlessException e) {
|
||||
TrackEvent.warn(e.getMessage());
|
||||
return Optional.of(e);
|
||||
}
|
||||
|
||||
try {
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
Platform.setImplicitExit(false);
|
||||
|
|
Loading…
Reference in a new issue