mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform] fixes JNA availability in AppIcon/Win7TaskBar
The latter has JNA types in signatures and shouldn't be loaded when JNA is unavailable.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.jna.JnaLoader;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationActivationListener;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
@@ -45,7 +46,7 @@ public abstract class AppIcon {
|
||||
if (SystemInfo.isMac) {
|
||||
ourIcon = new MacAppIcon();
|
||||
}
|
||||
else if (SystemInfo.isWin7OrNewer) {
|
||||
else if (SystemInfo.isWin7OrNewer && JnaLoader.isLoaded()) {
|
||||
ourIcon = new Win7AppIcon();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.jna.JnaLoader;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.wm.IdeFrame;
|
||||
@@ -74,7 +73,7 @@ class Win7TaskBar {
|
||||
}
|
||||
|
||||
private static boolean initialize() {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode() || !JnaLoader.isLoaded()) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user