<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: v1909
PowerToys version: v0.15.2
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: v1909
PowerToys version: v0.15.2
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Setup zones and assign several applications to several zones</li>
<li>Plugin in multiple monitors</li>
<li>Put machine to sleep</li>
<li>Wake machine</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<ol dir="auto">
<li>Both monitors appear to wake from sleep immediately</li>
<li>All application windows stay put</li>
</ol>
<h1 dir="auto">Actual behavior</h1>
<ol dir="auto">
<li>Both monitors appear to wake from sleep immediately</li>
<li>All application windows move from secondary display to primary display</li>
</ol>
<p dir="auto">I can record a video if that isn't clear.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">As a developer with 5 monitors, whenever I have to go to a meeting which requires my laptop, I usually have to spend a couple minutes minimizing windows once un-docked, then 3-5 minutes re-positioning/resizing a bazillion windows back onto my multiple monitors.</p>
<p dir="auto">It would be awesome to have a PowerToy that at least attempted to keep my layout between dock cycles, maybe integrated into the virtual desktops feature in Windows 10</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">Whenever a graphics/monitor hardware event occurs, and before Windows re-positions all windows, take a snapshot of the monitor layout, all main window handles and their current positions.</p>
<p dir="auto">Then, check if the new layout/monitor configuration matches to any previous snapshots, and align the windows accordingly.</p>
<p dir="auto">The initial version could just go off window handles, but maybe future versions could allow users to specify regular expressions for window titles/tab names (in the event windows are closed then re-opened.)</p>