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.
This commit is contained in:
Vadim Zeitlin
2020-07-09 17:40:20 +02:00
parent 3ceb425a73
commit 03e79fce63

View File

@@ -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);