- // NB: Focus setting is really funny, atleast on wxMSW. First of all,
- // we need to have SetFocus at the end. Otherwise wxTextCtrl may
- // freeze until focus goes somewhere else. Second, wxTreeCtrl as
- // popup, when dismissing, "steals" focus back to itself unless
- // SetFocus is called also here, exactly before m_popupWinState
- // is set to false. Which is truly weird since SetFocus is just
- // wxWindowMSW method and does not call event handler or anything like
- // that (ie. does not care about m_popupWinState).
-
- SetFocus();
-
- // This should preferably be set before focus.