Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left clicking on the Windows 10 tray icon tries to rapidly open the menu multiple times #76

Closed
YiannisDermitzakis opened this issue Oct 27, 2020 · 12 comments
Assignees

Comments

@YiannisDermitzakis
Copy link

This is not a big deal, as right click opens the menu once, as expected, but it's confusing.

@YiannisDermitzakis
Copy link
Author

Update: Actually, sometimes it gets in an (infinite?) loop and the application crashes.

@tom-james-watson
Copy link
Owner

What version of windows and of break timer?

@YiannisDermitzakis
Copy link
Author

Windows 10 Pro, Version 2004
BreakTimer 0.7.5

@tom-james-watson
Copy link
Owner

Can you please try with version 0.7.6 which was released a few days ago. It upgraded Electron, which would be the kind of thing that would fix this. Thanks!

@YiannisDermitzakis
Copy link
Author

Yup, that was it. Thanks!

@YiannisDermitzakis
Copy link
Author

I guess it was premature of me to close the issue. After using the 0.7.6 for a while, it began demonstrating the same behavior.

@ozzi-
Copy link

ozzi- commented Dec 17, 2020

Win 10, 0.7.7 - freshly installed - can't reproduce

@WayneKoorts
Copy link

WayneKoorts commented Dec 21, 2020

Hi, I've just discovered BreakTimer and came to see if anyone else was experiencing this issue. I'm on Windows 10, 0.7.7. It doesn't happen right after the app opens, but I'll see if I can figure out how to reproduce it. It clearly happens after having the app open for some time.

When it does happen, it ultimately ends up crashing the app.

@WayneKoorts
Copy link

I've had the app running for about 5 minutes now and it's already starting to happen. There seems to be some correlation between the timer logic and the number of times the menu opens. If I had the time, I would look into the code myself, but at this stage I'd suggest looking at your assignment of events relating to the menu opening. My gut feeling is there is a huge stack of duplicate menu open events piling up over time which then get fired all at the same time.

I've also noticed that the issue doesn't occur with right-clicks, only with left-clicks.

@WayneKoorts
Copy link

Fast-forward about an hour and, as suspected, the delay has gotten progressively worse, but not to the point of crashing. Right-click is still instant. The last full crash I had was first thing this morning, after the app had been running for probably 20ish hours.

Anyway, hopefully this is enough info for someone to be able to investigate further at the code-level. Happy to do further testing if required.

@tom-james-watson
Copy link
Owner

OK - thanks for that info - that led me straight to the problem. This code:

https://github.com/tom-james-watson/breaktimer-app/blob/master/app/main/lib/tray.ts#L120-L122

Should be moved to just below

https://github.com/tom-james-watson/breaktimer-app/blob/master/app/main/lib/tray.ts#L29

so that we only ever register this click event once.

Till that change is made, the workaround is to use right click!

@tom-james-watson tom-james-watson self-assigned this Dec 22, 2020
@tom-james-watson
Copy link
Owner

Fixed in 20f3146. Will be available in version 0.8.0 which is being published now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants