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

Fix erroneous SetCapture after COptionMenu::onMouseDown #303

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

nickdowell
Copy link
Contributor

Fixes #302

COptionMenu::onMouseDown returns kMouseDownEventHandledButDontNeedMovedOrUpEvents

Prior to release 4.11, Win32Frame::proc would not call SetCapture in response:

if (pFrame->platformOnMouseDown (where, buttons) == kMouseEventHandled && getPlatformWindow ())
SetCapture (getPlatformWindow ());

In 4.11 and onwards, only event.consumed is being checked, so kMouseDownEventHandledButDontNeedMovedOrUpEvents results in a call to SetCapture which leads to the behavious described in #302:

if (event.consumed && getPlatformWindow ())
SetCapture (getPlatformWindow ());

This PR adds a !event.ignoreFollowUpMoveAndUpEvents () check so that SetCapture is not called in response to kMouseDownEventHandledButDontNeedMovedOrUpEvents.

@scheffle scheffle merged commit f3f776c into steinbergmedia:develop Jul 3, 2023
@nickdowell nickdowell deleted the fix-win32-coptionmenu branch July 3, 2023 19:06
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.

[Windows] Cannot move window after a COptionMenu has been popped up
2 participants