From 9562ca2b70c5421a9f3e94d6ea818efad0ac265b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 24 Oct 2018 02:06:46 +0200 Subject: [PATCH] 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. --- src/common/popupcmn.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 19c16e4fb5..f3ebf49c90 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -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; }