From 03e79fce63974cf603d4c16bf914425c6d75aea2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 9 Jul 2020 17:40:20 +0200 Subject: [PATCH] Don't set focus to wxTipWindowView when using wxPopupWindow At least under MSW this results in an activation loss for the previously active TLW, as it activates wxTipWindow itself, which looks bad. And, of course, setting focus is completely unnecessary in the first place, as this window doesn't accept any input and wxEVT_KILL_FOCUS is handled only when not using wxPopupWindow. --- src/generic/tipwin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/generic/tipwin.cpp b/src/generic/tipwin.cpp index f73dbf82bd..b3f56f51d6 100644 --- a/src/generic/tipwin.cpp +++ b/src/generic/tipwin.cpp @@ -136,7 +136,9 @@ wxTipWindow::wxTipWindow(wxWindow *parent, // set size, position and show it m_view = new wxTipWindowView(this); m_view->Adjust(text, maxLength); +#if !wxUSE_POPUPWIN m_view->SetFocus(); +#endif int x, y; wxGetMousePosition(&x, &y);