moses-palmer / pystray

GNU General Public License v3.0
463 stars 57 forks source link

Thread doesn't exit on error #97

Closed kmchmk closed 2 years ago

kmchmk commented 2 years ago

Following program doesn't quit. Probably can be fixed.

import pystray
from PIL import Image

def call_stop(icon):
    icon.stop()

menu = (pystray.MenuItem("Item", call_stop),
        None) # <- Causes error
icon = pystray.Icon("name", Image.new('RGBA', (100, 50)), "Title", menu)
icon.run(call_stop)
moses-palmer commented 2 years ago

Thank you for your report.

I have added a workaround on the master branch which fixes this issue.