qpwgraph icon indicating copy to clipboard operation
qpwgraph copied to clipboard

Trying to open qpwgraph via the icon always creates a new instance

Open zastrixarundell opened this issue 1 year ago • 4 comments

Hey!

Love this software, but I have one specific irk with it (just a QoL feature). Namely, when I close qpwgraph it works in the background which is perfect. But when I want to open it I have to do it from the notification menu, otherwise another instance of qpwgraph would open so I have to close it, close the 2nd one from the notification menu and then open the first one from the notification.

Keep in mind that I am using flatpak, I'm not sure if it's present on the standard version, I use an immutable OS.

zastrixarundell avatar Jun 10 '24 10:06 zastrixarundell

the standard version has this means (shared memory) to detect whether another instance is already up and running and if it is relinquish control to it and bail out.

upstream (me) knows nothing or very little about flatpak, maybe it just doesn't work if at all under a sandboxed environment; please file an issue to the proper tracker: https://github.com/flathub/org.rncbc.qpwgraph.

there might be an option or special configuration, re. shmem access, when dealing with the flatpak version; otherwise it's all considered normal behavior. thanks

rncbc avatar Jun 10 '24 10:06 rncbc

Hm, this is mot likely something which should be fixed upstream (I'll see to look into it) or potentially patch downstream on flathub (but a better idea would be to just fix it upstream).

I know that it does work on other flatpaks as Vesktop, Spotify, Heroic and Steam, so it's not a general issue with flatpaks.

I did check for example spotify and there's no custom permission which qpwgraph doesn't have.

zastrixarundell avatar Jun 10 '24 10:06 zastrixarundell

if it's not a problem for you, could just just send a permalink for the area of the checks whether a new instance should open? I'm still unfamiliar with this code and it'd be a massive help!

zastrixarundell avatar Jun 10 '24 10:06 zastrixarundell

https://github.com/rncbc/qpwgraph/blob/0a56c93651a250ae162b1d32a73d8b7022702a00/src/qpwgraph.cpp#L147-L270

rncbc avatar Jun 10 '24 11:06 rncbc