Window re-appears when monitor is disconnected or resolution changes

Description

I run a triple monitor set-up, but I leave one of these disabled most of the time. When I do plug it in, Mailspring almost always appears maximized on my screen, even if it was minimized or closed to the tray.

This also happens sometimes when I launch a video game that’s at a non-native resolution. Sometimes Windows will freak out if the game defaults to fullscreen at a non-native resolution, and when it shoves me back to the desktop, Mailspring will be open on that or another monitor.

To Reproduce…

Steps to reproduce the behavior:

  1. Make sure one monitor is disconnected either through Windows display settings or physically unplug the display cable
  2. Confirm that Mailspring is closed to the tray, and not just minimized in the taskbar.
  3. Activate the other monitor
  4. Observe that Mailspring is now maximized.

Expected Behavior

I would, of course, expect it to not open on its own.

Setup

  • OS and Version: Windows 11 22000.194
    • Installation Method: Installer
  • Mailspring Version: 1.9.2

Additional Context

I just swapped to Windows 11 yesterday, but this was happening for months on my Windows 10 machine.