]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dragimgg.cpp
Applied patch [ 603104 ] wxX11 wxClientDC, wxPaintDC fix
[wxWidgets.git] / src / generic / dragimgg.cpp
index 8c1b4ab485d33dc22f1470ae00c76fd7c17b8a10..d625524ed37e72bf31b04cad9b2fd4c88c8958ee 100644 (file)
@@ -295,7 +295,13 @@ bool wxGenericDragImage::EndDrag()
 {
     if (m_window)
     {
-        m_window->ReleaseMouse();
+#ifdef __WXMSW__
+        // Under Windows we can be pretty sure this test will give
+        // the correct results
+        if (wxWindow::GetCapture() == m_window)
+#endif
+            m_window->ReleaseMouse();
+
         if (m_cursor.Ok() && m_oldCursor.Ok())
         {
             m_window->SetCursor(m_oldCursor);