+
+#ifdef __WXMSW__
+ // MSW doesn't allow to set focus to the popup window, but we need to
+ // subclass the window which has the focus, and not winFocus passed in or
+ // otherwise everything else breaks down
+ m_focus = FindFocus();
+ if ( m_focus )
+#endif // __WXMSW__
+ {
+ delete m_handlerFocus;
+ m_handlerFocus = new wxPopupFocusHandler(this);
+
+ m_focus->PushEventHandler(m_handlerFocus);
+ }