Closed Techcable closed 2 years ago
Thank you for your report!
This is a very clear bug, and I will correct is as soon as possible.
Hi! I've managed to work around this issue by spawning a subprocess to deal with the webview and have the parent process handle the icon.
Although this is kind of hacky, this fixes most of my issues :wink:
I'm using windows and I'm having the same problem: I tried to edit _base.py removing the "setup" variable:
threading.Thread(target=lambda: self.run()).start()
It worked well but now I can't stop the program calling stop()
Can anyone point me how can I manage to stop the thread properly?
Hi, I'm very new to python, so please be patient if I'm wrong.
Tried the "run_detached" method on windows 10 and reached an error in the same line. I noticed in your source code that "_run_detached" gets no argument "setup" . After correcting it everything works fine for me. Hope I'm right and this is helpfull:
changed: def _run_detached(self):
to def _run_detached(self,setup):
in "run_detached" I changed self._run_detached()
to self._run_detached(setup)
I have to correct myself, the "stop" method hangs now infinite when trying to exit the program.
@eyrinck, @mmsbr and @Techcable, there is a new release, pystray 0.19.0, which incorporates the fix previously only available in the development version.
I am using Linux in the context of a GTK webapp using pywebview.
I believe the error is here: https://github.com/moses-palmer/pystray/blob/21d0e5d98b2e98a9a8641a82cd05eaf4113c048d/lib/pystray/_base.py#L384
It should be present on all non-OSX platforms, regardless of whether or not
setup
is set or not :frowning:Is some sort of better integration with Linux needed?