From 7dea9423c564592d8ea14ef728dec7103ac4a56f Mon Sep 17 00:00:00 2001 From: ali kettab Date: Wed, 27 Dec 2023 19:48:25 +0100 Subject: [PATCH] Fix wxPopupTransientWindow::Dismiss() implementation Remove installed event handlers before trying to hide the popup, as this could result in Destroy() being called twice under wxQt. This happens to wxRichToolTip for example. i.e. Destroy() is called once from wxPopupFocusHandler::OnKillFocus() after the call to Hide() then, from wxRichToolTipPopup::OnTimer(). --- src/common/popupcmn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index bf11efccbc..a0b9e8b721 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -431,8 +431,8 @@ bool wxPopupTransientWindow::Show( bool show ) void wxPopupTransientWindow::Dismiss() { - Hide(); PopHandlers(); + Hide(); } #if defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON