Closed nickdowell closed 1 year ago
Fixes #302
COptionMenu::onMouseDown returns kMouseDownEventHandledButDontNeedMovedOrUpEvents
COptionMenu::onMouseDown
kMouseDownEventHandledButDontNeedMovedOrUpEvents
Prior to release 4.11, Win32Frame::proc would not call SetCapture in response: https://github.com/steinbergmedia/vstgui/blob/6431f630f65f630c52ec1dfbb93d39d40600c41c/vstgui/lib/platform/win32/win32frame.cpp#L778-L779
Win32Frame::proc
SetCapture
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: https://github.com/steinbergmedia/vstgui/blob/addf12b9486fd9460a3abf2cf2a2dd96c44ed807/vstgui/lib/platform/win32/win32frame.cpp#L833-L834
event.consumed
This PR adds a !event.ignoreFollowUpMoveAndUpEvents () check so that SetCapture is not called in response to kMouseDownEventHandledButDontNeedMovedOrUpEvents.
!event.ignoreFollowUpMoveAndUpEvents ()
Fixes #302
COptionMenu::onMouseDown
returnskMouseDownEventHandledButDontNeedMovedOrUpEvents
Prior to release 4.11,
Win32Frame::proc
would not callSetCapture
in response: https://github.com/steinbergmedia/vstgui/blob/6431f630f65f630c52ec1dfbb93d39d40600c41c/vstgui/lib/platform/win32/win32frame.cpp#L778-L779In 4.11 and onwards, only
event.consumed
is being checked, sokMouseDownEventHandledButDontNeedMovedOrUpEvents
results in a call toSetCapture
which leads to the behavious described in #302: https://github.com/steinbergmedia/vstgui/blob/addf12b9486fd9460a3abf2cf2a2dd96c44ed807/vstgui/lib/platform/win32/win32frame.cpp#L833-L834This PR adds a
!event.ignoreFollowUpMoveAndUpEvents ()
check so thatSetCapture
is not called in response tokMouseDownEventHandledButDontNeedMovedOrUpEvents
.