[Linux] Use XDG Background Portals to prevent window "flash" on startup

Since v1.18.0, the --background flag on Linux/Wayland causes the main window to flash briefly before hiding. Utilizing the XDG Background Portal would allow a truly “silent” startup.

The Problem

On Ubuntu (GNOME/Wayland), when Mailspring is set to “Launch on System Start,” the main window “pops” onto the screen for a split second before retreating to the tray. It looks kinda ‘dated’ and reminds me of a MS windows startup sequence. It is distracting and feels unpolished, which is very much the opposite of the wonderful UI of Mailspring generally.

Proposed Solution

Implement support for the XDG Background Portal (org.freedesktop.portal.Background).
Instead of the app initializing a visible window and then hiding it, Mailspring should request background permission via the portal.
This allows the app to stay alive and initialize its sync engine while the BrowserWindow remains hidden (show: false).
This is the modern, standardized way for Wayland-native apps to handle background persistence.

Alternative Solutions

I have experimented with scripts, but essentially they only delay the process and disrupt the update cycle.

Context

This issue seems to be a specific regression/limitation introduced in the v1.18.0 update. In previous versions, the startup was often “silent,” but the move to better Wayland compatibility appears to have come at the cost of this “window flash.” The release notes for v1.18.0 even mention that this show/hide behavior is currently considered the “best possible” path for Linux/Wayland. I am not sure this is entirely true.