Dock the tray icon once the window is on screen

Docking waits for the panel to adopt the icon, which held up the main
window; wait at most half a second for it before falling back to AWT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 12:25:44 +00:00
co-authored by Claude Opus 5.5
parent 75df46a03a
commit 002b1ac7ce
2 changed files with 15 additions and 4 deletions
@@ -33,7 +33,7 @@ public final class X11Tray implements TrayBackend {
private static final int DEFAULT_SIZE = 24;
private static final int POLL_MS = 40;
/** How long to give the panel to adopt the icon before falling back to AWT. */
private static final int DOCK_TIMEOUT_MS = 1500;
private static final int DOCK_TIMEOUT_MS = 500;
/** Anything narrower than this is a sliver, not an icon the panel meant to give us. */
private static final int MIN_SENSIBLE_SIZE = 8;
/** A tall panel should still not get a huge icon. */