Closed nickdowell closed 1 year ago
Update: this is a regression introduced in release 4.11
Using git bisect
I have tracked it down to commit e0acde7fef744eae9010713a0de2c4ad72712b4f
e0acde7fef744eae9010713a0de2c4ad72712b4f is the first bad commit
commit e0acde7fef744eae9010713a0de2c4ad72712b4f
Author: scheffle <scheffle@users.noreply.github.com>
Date: Sat Apr 24 17:59:09 2021 +0200
new mouse event handling
vstgui/lib/cframe.cpp | 269 +++++++++++----------
vstgui/lib/cframe.h | 10 +-
vstgui/lib/cview.cpp | 105 ++++++++
vstgui/lib/cview.h | 14 +-
vstgui/lib/cviewcontainer.cpp | 195 ++++++++-------
vstgui/lib/cviewcontainer.h | 11 +-
vstgui/lib/events.h | 245 ++++++++++++++++++-
vstgui/lib/platform/iplatformframecallback.h | 3 -
vstgui/lib/platform/mac/cocoa/nsviewframe.mm | 81 ++++---
vstgui/lib/platform/win32/win32frame.cpp | 105 ++++----
vstgui/lib/vstguifwd.h | 5 +
.../examples/standalone/resource/resources.uidesc | 2 +-
.../examples/standalone/resource/test.uidesc | 12 +-
vstgui/tests/unittest/lib/cframe_test.cpp | 91 ++++---
vstgui/tests/unittest/lib/csplitview_test.cpp | 68 +++---
vstgui/tests/unittest/lib/cview_test.cpp | 9 +-
vstgui/tests/unittest/lib/cviewcontainer_test.cpp | 58 +++--
vstgui/tests/unittest/unittests.cpp | 6 +
vstgui/tests/unittest/unittests.h | 2 +-
19 files changed, 874 insertions(+), 417 deletions(-)
The root cause is that Win32Frame::proc
is calling SetCapture
when handling WM_XBUTTONDOWN
for option menus. COptionMenu returns kMouseDownEventHandledButDontNeedMovedOrUpEvents
so this wasn't the case before the offending commit. Pull Request with fix incoming!
Steps to reproduce
standalone
targetCOptionMenu
controls on the right hand sideThis bug does not occur if the menu is dismissed by clicking outside the popup.
Note: it also occurs when using vstgui in a plug-in, not just standalone.
Does not occur on macOS.
Environment