]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/popupwin.cpp
TLW default item changes have changed Enter key processing: it was now handled as...
[wxWidgets.git] / src / msw / popupwin.cpp
index 78a9a676bf084e69c0ac7e868c4e87bc70283879..d28e3cdfa616d8a38e08caebf3c82b08eda20954 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        msw/popupwin.cpp
+// Name:        src/msw/popupwin.cpp
 // Purpose:     implements wxPopupWindow for MSW
 // Author:      Vadim Zeitlin
 // Modified by:
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "popup.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
     #pragma hdrstop
 #endif
 
+#if wxUSE_POPUPWIN
+
 #ifndef WX_PRECOMP
-#include "wx/defs.h"
 #endif //WX_PRECOMP
 
-#if wxUSE_POPUPWIN
-
 #include "wx/popupwin.h"
 
 #include "wx/msw/private.h"     // for GetDesktopWindow()
@@ -107,10 +102,12 @@ bool wxPopupWindow::Show(bool show)
         {
             wxLogLastError(_T("SetWindowPos"));
         }
+
+        // and set it as the foreground window so the mouse can be captured
+        ::SetForegroundWindow(GetHwnd());
     }
 
     return true;
 }
 
 #endif // #if wxUSE_POPUPWIN
-