<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">For the native tray icons on windows, switching to dark mode will invert them. This is very similar to the behavior on macOS (though on macOS it seems to work for third party apps as well, including electron apps). As far as I can tell, there isn't a clear way for an electron app to do a tray icon on windows that automatically inverts when the light/dark mode setting switches.</p>
<p dir="auto">I think part of the issue is that the app mode vs the shell mode is two settings, and electron doesn't expose the shell mode: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="479993780" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/19729" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/19729/hovercard" href="https://github.com/electron/electron/issues/19729">#19729</a></p>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">Perhaps electron could provide a tray api update that lets you specify alternative tray icons for light and dark mode on windows?</p>
<h3 dir="auto">Alternatives Considered</h3>
<p dir="auto">At the very least, an api that exposes which mode the shell is in, could be nice. Not sure how you'd auto update the tray icon without polling, though. is there a window message or some kind of event we could listen on for this?</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hacdias/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hacdias">@hacdias</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/deermichel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/deermichel">@deermichel</a></p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>master</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>win7 sp1 x64</li>
</ul>
</li>
</ul>
<ul dir="auto">
<li>projects generated by <code class="notranslate">gn gen out/Testing-x86 --ide=vs2019</code></li>
<li>opening <code class="notranslate">all.sln</code></li>
<li>error: <code class="notranslate">error  : Cannot load project with duplicated project items: ../../../../electron/shell/common/api/constructor.h is included as 'None' and as 'None' item types. </code></li>
<li>removing the duplicate <code class="notranslate">constructor.h</code> entry in the project file resolves the problem</li>
</ul>