diff --git a/native/WinLauncher/WinLauncher/WinLauncher.cpp b/native/WinLauncher/WinLauncher/WinLauncher.cpp index c67b99c389c8..b292f4a45d20 100644 --- a/native/WinLauncher/WinLauncher/WinLauncher.cpp +++ b/native/WinLauncher/WinLauncher/WinLauncher.cpp @@ -488,6 +488,9 @@ void AddPredefinedVMOptions(std::vector& vmOptionLines) { vmOptionLines.push_back(std::string("-Didea.properties.file=") + propertiesFile); } + std::stringstream id; + id << "-Djbre.win.app.icon.id=" << static_cast(IDI_WINLAUNCHER); + vmOptionLines.push_back(id.str()); } bool LoadVMOptions() diff --git a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java index 428b1bf3b831..1ebefce37c2d 100644 --- a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java +++ b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.java @@ -69,6 +69,12 @@ public class AppUIUtil { private static boolean ourMacDocIconSet = false; public static void updateWindowIcon(@NotNull Window window) { + if (SystemInfo.isWindows && + Integer.getInteger("jbre.win.app.icon.id") != null && + SystemProperties.getBooleanProperty("jbre.win.app.icon.supported", false)) // set by JBRE + { + return; // JBRE will load icon from the exe resource + } ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance(); List images = ContainerUtil.newArrayListWithCapacity(3);