Block child window events propagation beyond wxPopupWindow

Set wxWS_EX_BLOCK_EVENTS to prevent events bubbling up to the popup
parent as it doesn't make much sense.

See #18243.
This commit is contained in:
Vadim Zeitlin
2018-10-24 02:06:46 +02:00
parent 56c4191168
commit 9562ca2b70

View File

@@ -135,6 +135,12 @@ wxPopupWindowBase::~wxPopupWindowBase()
bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags))
{
// By default, block event propagation at this window as it usually
// doesn't make sense. This notably prevents wxScrolledWindow from trying
// to scroll popup contents into view if a popup is shown from it but
// extends beyond its window boundaries.
SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);
return true;
}