blueman icon indicating copy to clipboard operation
blueman copied to clipboard

Do dbus activation like Gedit

Open infirit opened this issue 2 years ago • 2 comments

There are plenty of GtkApplication apps that are dbus activatable, basically all of gnome. Gedit and other Gnome apps do it like this so let's copy it. Maybe this helps with missing DISPLAY variable (:eyes:) but this is how it supposed to be done anyway so here we go.

I added this only for the actual Gio/GtkApplications

infirit avatar Sep 28 '22 19:09 infirit

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Sep 28 '22 19:09 sonarqubecloud[bot]

Trying to understand things... So, the argument tags the GApplication a service and, as far as I understand, a service has an extra 10 seconds timeout in which the activating message may arrive and get processed before it quits when its use count became zero.

I think that should not be relevant for blueman-applet as we call hold in its do_activate method and never release it. blueman-manager's application's hold method probably gets called by the GtkApplicationWindow and I guess it releases when it gets closed or something. The application seems to terminate immediately anyway. I can both close the window within the first 10 seconds and see the process die immediately and still replicate the DISPLAY misconfiguration as in https://github.com/blueman-project/blueman/issues/1864#issuecomment-1260712168 with GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying (4) from blueman-applet.

cschramm avatar Sep 29 '22 07:09 cschramm