mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Don't set up desktop integration if platform doesn't work
This commit is contained in:
parent
9dc5cf8048
commit
62cb424040
1 changed files with 6 additions and 0 deletions
|
@ -17,6 +17,12 @@ import javax.imageio.ImageIO;
|
|||
public class AppDesktopIntegration {
|
||||
|
||||
public static void setupDesktopIntegrations() {
|
||||
// Check if we were/are able to initialize the platform
|
||||
// If not, we don't have to attempt the awt setup as well
|
||||
if (!PlatformState.initPlatformIfNeeded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (Desktop.isDesktopSupported()) {
|
||||
Desktop.getDesktop().addAppEventListener(new SystemSleepListener() {
|
||||
|
|
Loading…
Reference in a new issue