hezral / clips

Multi format clipboard manager with extra features
GNU General Public License v3.0
39 stars 1 forks source link

When "Hides on Startup" is activated and "Persistent mode" deactivated, the second attempt to run clips fails #15

Closed jsgadas closed 3 years ago

jsgadas commented 3 years ago

First of all, thank you for your valuable work.

I found a small issue when "Hides on Startup" is activated and "Persistent mode" deactivated.

I would expect that the first execution of the software should not be viewed, however, the second execution also fails, please see attached.

2021-09-03 19-56-48

hezral commented 3 years ago

Thanks for trying the app.

The close button actually exits the app. And the app is not meant to run in multiple instances if that is what you were trying to do? What did you mean by "the second execution also fails"?

hezral commented 3 years ago

i think i understand the issue now, i believe the hide-on-start and persistent-mode is conflicting during app start-up. figuring out how to fix the conflict

jsgadas commented 3 years ago

Sorry, I wasn't clear.

The close button actually exits the app.

yes, the app is not running in the background anymore. Before that, however, I had turned on the "Persistent mode". Everything works fine with this configuration, i.e, running "flatpak run com.github.hezral.clips" in the top terminal, the app runs in the background, if another instance is requested (second execution in bottom terminal) the app appears.

And the app is not meant to run in multiple instances if that is what you were trying to do? What did you mean by "the second execution also fails"?

Maybe I'm not using the app in the right way. I would like to call a second instance of the app after the first one is running in the background.

For example, if the app had been started (in the background) with the system, the software should appear running "flatpak run com.github.hezral.clips", right?

Right now, I have to execute "flatpak run com.github.hezral.clips" two times to see the app, even it is already running in the background. But this happens only when "Hides on Startup" is activated and "Persistent mode" is deactivated.

hezral commented 3 years ago

Thanks, yeah that's the same understanding i have with the issue and am able to reproduce.

hezral commented 3 years ago

by the way, when you call a second instance, it will actually bring back the main instance, not create a separate instance.

hezral commented 3 years ago

Fixed in https://github.com/hezral/clips/commit/a0389e96fb43b04acafb0563fad32c7220e4a658

Found a better algorithm

jsgadas commented 3 years ago

I've already tested the new version you provided. Thank you very much!

hezral commented 3 years ago

Cool. I just submitted for AppCenter release, might take a few days.