Hello,
I’m trying to make my GTK application D-Bus activatable, but I’m facing a strange issue: the application is activated twice, resulting in two windows being opened. However, depending on how I launch it, the behavior is different:
- When launching from the app grid, two windows are opened, but the icon doesn’t immediately appear in the dash, and the loading cursor continues spinning until then. When closing the windows before the icon appears and trying to run the app again, it is still marked as being launched.
- With
gapplication launch [app-id]
, two windows are opened, and the icon in the dash appears and disappears correctly. - When activating from D-Feet, everything works as expected. Only one window opens, and the icon in the dash appears and disappears correctly.
These are my .desktop
and .service
files:
[Desktop Entry]
Name=Metadata Cleaner
Icon=fr.romainvigier.MetadataCleaner
Exec=metadata-cleaner %F
Type=Application
DBusActivatable=true
[D-BUS Service]
Name=fr.romainvigier.MetadataCleaner
Exec=metadata-cleaner
I’m at a loss as to what is causing it, do you have any pointers I can look at?