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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user