exlab_wizard.tray.window_launcher#
Spawn / focus the on-demand window subprocess. Backend Spec §4.3.2.
The tray clicks Open -> WindowLauncher either:
spawns a fresh
exlab-wizard-windowsubprocess viasubprocess.Popen()when no window is currently alive, orfocuses the existing window (best-effort) when one is already up.
The tray process never blocks on the window subprocess; it polls
Popen.poll() to detect window-exit and treats a stale child as “no
window present” on the next Open click.
This module is deliberately small: pywebview-driven focus is OS-specific
and best-effort. On Linux without a working xdotool the launcher
falls back to spawning a second window, which pywebview tolerates on
some desktop environments and not others – this is acceptable per
§4.3.2’s “best-effort” note.
Classes
|
Spawn |
- class exlab_wizard.tray.window_launcher.WindowLauncher(*, window_executable=None, state_dir)[source]#
Bases:
objectSpawn
exlab-wizard-windowas a subprocess, track its PID.On a re-open request with an existing live child, focuses the existing window (best-effort) rather than spawning a duplicate (Backend §4.1: “single-instance window”).