IDEA-182266 [windows] do not override app icon

This commit is contained in:
Anton Tarasov
2017-11-16 16:33:27 +03:00
parent 23750feac6
commit c95b6517b9
2 changed files with 9 additions and 0 deletions
@@ -488,6 +488,9 @@ void AddPredefinedVMOptions(std::vector<std::string>& vmOptionLines)
{
vmOptionLines.push_back(std::string("-Didea.properties.file=") + propertiesFile);
}
std::stringstream id;
id << "-Djbre.win.app.icon.id=" << static_cast<int>(IDI_WINLAUNCHER);
vmOptionLines.push_back(id.str());
}
bool LoadVMOptions()
@@ -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<Image> images = ContainerUtil.newArrayListWithCapacity(3);