Skip to content

Fix WM_HOTKEY handling to prevent unintended message propagation #413

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thouravi
Copy link

Description

When gHotkeyIgnoreCount > 0, the WM_HOTKEY message handler breaks out of the switch statement instead of returning early. This allows the message to propagate to DefWindowProc, potentially triggering unintended hotkey behavior in other applications (e.g., if the same hotkey is registered elsewhere).

Solution

Replacing the break statement with return 0 in the WM_HOTKEY ignore block ensures the message is marked as "handled," preventing further propagation.

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