Skip to content

Hide the window into the tray on start when "start minimized" is set - #2

Closed
Jegern wants to merge 1 commit into
lib4u:mainfrom
Jegern:fix/start-minimal-to-tray
Closed

Jegern wants to merge 1 commit into
lib4u:mainfrom
Jegern:fix/start-minimal-to-tray

Conversation

@Jegern

@Jegern Jegern commented Nov 1, 2026

Copy link
Copy Markdown

Problem

With Start minimized and Autostart enabled, Thronium opens its window on login instead of going to the tray (KDE Plasma, Wayland; tray works, the indicator is registered with StatusNotifierWatcher).

start_minimal only calls window.minimize() once on RunEvent::Ready. The saved geometry is restored (maximized: true) in window_geometry::restore, and the minimize request is not honoured for that window, so the window stays visible. Even when minimize works, the setting never put the app into the tray.

Change

  • system_settings::ready now calls the new window_behavior::start_minimal.
  • start_minimal hides the window the same way closing to the background does (background(app, can_hide)) when a tray host is available, and falls back to the previous minimize() when there is no tray.
  • Right after login the tray host may register slightly later than an autostarted app, so when a tray is expected it is waited for up to 5 s. With the tray disabled or not installed there is no wait, so the remembered connection is not delayed.
  • host_available and background are now pub(crate).

The existing watch loop still restores the window if the tray host disappears while it is hidden.

Testing

Not built or run. I could not compile it locally, so please run CI / a local build. Behaviour to check: autostart with Start minimized on, with a tray host present (window hidden, reachable from the tray) and without one (window minimized).

🤖 Generated with Claude Code

start_minimal only called window.minimize() once at startup. On a
maximized window under KDE Plasma (Wayland) that request is not honoured,
so an autostarted Thronium opened its window, and it never went to the tray.

Hide the window like closing to the background does when a tray host is
available (waiting briefly for it right after login), and keep minimizing
only when there is no tray.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Jegern Jegern closed this by deleting the head repository Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant