+#ifdef __WXMSW__
+void wxPopupTransientWindow::OnIdle(wxIdleEvent& event)
+{
+ event.Skip();
+
+ if (IsShown() && m_child)
+ {
+ wxPoint pos = ScreenToClient(wxGetMousePosition());
+ wxRect rect(GetSize());
+
+ if ( rect.Contains(pos) )
+ {
+ if ( m_child->HasCapture() )
+ {
+ m_child->ReleaseMouse();
+ }
+ }
+ else
+ {
+ if ( !m_child->HasCapture() )
+ {
+ m_child->CaptureMouse();
+ }
+ }
+ }
+}
+#endif // __WXMSW__
+
+