Description
When launching lan-mouse (GUI mode, no args) multiple times, each invocation spawns a new daemon child process and opens a new GTK window. While the daemon detects the AlreadyRunning condition and the duplicate exits, the GUI layer does not check for an existing instance before spawning.
This results in:
- Unnecessary daemon child processes being spawned (they exit immediately, but it's wasteful)
- Duplicate GTK windows with separate IPC connections
- No window re-activation / raise behavior when the app is already open
Environment
- OS: Arch Linux
- Desktop: Hyprland (Wayland)
- lan-mouse version: 0.10.0
Expected Behavior
Launching lan-mouse when an instance is already running should:
- Detect the existing daemon and reuse it (no new child process)
- Raise/present the existing GTK window instead of creating a duplicate
Current Behavior
Each lan-mouse launch unconditionally:
- Spawns a new
lan-mouse daemon child process
- Creates a new GTK window with a new IPC connection
Description
When launching
lan-mouse(GUI mode, no args) multiple times, each invocation spawns a new daemon child process and opens a new GTK window. While the daemon detects theAlreadyRunningcondition and the duplicate exits, the GUI layer does not check for an existing instance before spawning.This results in:
Environment
Expected Behavior
Launching
lan-mousewhen an instance is already running should:Current Behavior
Each
lan-mouselaunch unconditionally:lan-mouse daemonchild process