From ffe42ca62784654b0a82555952c7e9bbf871019a Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 5 Apr 2010 17:18:41 +0000 Subject: [PATCH] In wxPopupFocusHandler, watch for EVT_CHAR, not EVT_KEY_DOWN. We should close the popup only if neither of these events was processed; previously, EVT_CHAR would never reach the popup in open state, as it would be closed automatically. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/popupcmn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 65a487e2de..44eb9c7000 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -86,7 +86,7 @@ public: protected: void OnKillFocus(wxFocusEvent& event); - void OnKeyDown(wxKeyEvent& event); + void OnChar(wxKeyEvent& event); private: wxPopupTransientWindow *m_popup; @@ -105,7 +105,7 @@ END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxPopupFocusHandler, wxEvtHandler) EVT_KILL_FOCUS(wxPopupFocusHandler::OnKillFocus) - EVT_KEY_DOWN(wxPopupFocusHandler::OnKeyDown) + EVT_CHAR(wxPopupFocusHandler::OnChar) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxPopupTransientWindow, wxPopupWindow) @@ -600,7 +600,7 @@ void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event) m_popup->DismissAndNotify(); } -void wxPopupFocusHandler::OnKeyDown(wxKeyEvent& event) +void wxPopupFocusHandler::OnChar(wxKeyEvent& event) { // we can be associated with the popup itself in which case we should avoid // infinite recursion -- 2.45.2