Skip to content

fix(desktop): don't quit on arbitrary timer expiry - #618

Open
mikolysz wants to merge 1 commit into
trypsynth:masterfrom
mikolysz:fix-sleep-timer-close
Open

fix(desktop): don't quit on arbitrary timer expiry#618
mikolysz wants to merge 1 commit into
trypsynth:masterfrom
mikolysz:fix-sleep-timer-close

Conversation

@mikolysz

Copy link
Copy Markdown
Contributor

wxdragon's Timer::on_tick binds its callback to the owning frame's wxEVT_TIMER without a timer id, so every timer's tick runs the closures of all other timers bound to the same frame. This is likely an upstream bug.

The sleep-timer closure closed the application unconditionally, which also caused it to close when any other timers fired.

This bug was latent on master, as there were no other relevant timers which could cause it to trigger. However, I have future PRS in the pipeline that do need additional timers, hence this fix.

wxdragon's  Timer::on_tick  binds its  callback  to  the owning  frame's
wxEVT_TIMER without a timer id, so  every timer's tick runs the closures
of all other timers bound to the same frame.

The sleep-timer closure closed the application unconditionally, which
also caused it to close when any other timers fired.

This  bug was  latent on  master, as  there were  no other  timers which
could cause  it to trigger. However,  I have future PRS  in the pipeline
that do need additional timers, hence this fix.
@trypsynth

Copy link
Copy Markdown
Owner

Thanks for this! However, this hack makes me a bit uncomfortable. Would it be possible for you to investigate this issue upstream in wxDragon?

@mikolysz

mikolysz commented Jul 31, 2026 via email

Copy link
Copy Markdown
Contributor Author

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

Successfully merging this pull request may close these issues.

2 participants