Skip to content

Retry stopping the input hook and start the next one even if it fails - #120

Merged
G-Stas merged 1 commit into
mainfrom
fix/input-hook-stop
Oct 27, 2026
Merged

G-Stas merged 1 commit into
mainfrom
fix/input-hook-stop

Conversation

@G-Stas

@G-Stas G-Stas commented Oct 27, 2026

Copy link
Copy Markdown
Owner

libuiohook's hook_stop posts messages to the hook's thread and window and sometimes fails; SharpHook then threw from Dispose, InputHookHost kept the old hook as the running one and the new hook never started, so mouse hotkeys stopped after a hotkey mode switch until a restart. The hook is now stopped with Stop (Dispose marks it disposed before stopping, so it can't be retried), tried up to 5 times, and the host's state is cleared whatever happens.

libuiohook's hook_stop posts messages to the hook's thread and window and sometimes fails; SharpHook then threw from Dispose, InputHookHost kept the old hook as the running one and the new hook never started, so mouse hotkeys stopped after a hotkey mode switch until a restart. The hook is now stopped with Stop (Dispose marks it disposed before stopping, so it can't be retried), tried up to 5 times, and the host's state is cleared whatever happens.
@G-Stas
G-Stas merged commit 6547ce5 into main Oct 27, 2026
2 checks passed
@G-Stas
G-Stas deleted the fix/input-hook-stop branch November 3, 2026 19:35
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.

1 participant