regolith-linux / ilia

A GTK-based Desktop Executor
Apache License 2.0
85 stars 11 forks source link

fix: Ensure single instance using Gtk.Application #87

Closed SoumyaRanjanPatnaik closed 4 months ago

SoumyaRanjanPatnaik commented 4 months ago

The wayland session allows ilia to be spawned multiple times, causing stacked instances that need to be closed manually. This change refactors the main function to use Gtk.Application, which inherently ensures that only a single instance of the application is allowed to run. It also cleans up the Main.vala file by moving the all th application startup related logic to Application.vala.

To reproduce the issue, you can open multiple instances of ilia by holding down Super and pressing the space key more than once on the sway session without releasing Super.

SoumyaRanjanPatnaik commented 4 months ago

Tested this change in both wayland and x11 sessions and can verify it to be working.