]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dragimgg.cpp
use wxStockCursor (as documented and as already implemented in wxMotif) instead of...
[wxWidgets.git] / src / generic / dragimgg.cpp
index 56ee35e91ddd494ef0dab5fc395ecefa6c20dacf..2da9893cb2f8e0bab5c3994566c50882029dfeed 100644 (file)
@@ -187,7 +187,7 @@ bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor)
     dc2.SetFont(font);
     dc2.SetBackground(* wxWHITE_BRUSH);
     dc2.Clear();
-    dc2.SetBackgroundMode(wxTRANSPARENT);
+    dc2.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
     dc2.SetTextForeground(* wxLIGHT_GREY);
     dc2.DrawText(str, 0, 0);
     dc2.DrawText(str, 1, 0);
@@ -249,14 +249,14 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
     m_isDirty = false;
     m_isDirty = false;
 
-    window->CaptureMouse();
-
     if (m_cursor.Ok())
     {
         m_oldCursor = window->GetCursor();
         window->SetCursor(m_cursor);
     }
 
+    window->CaptureMouse();
+
     // Make a copy of the window so we can repair damage done as the image is
     // dragged.
 
@@ -451,7 +451,7 @@ bool wxGenericDragImage::Hide()
 }
 
 // More efficient: erase and redraw simultaneously if possible
-bool wxGenericDragImage::RedrawImage(const wxPoint& WXUNUSED(oldPos),
+bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos,
                                      const wxPoint& newPos,
                                      bool eraseOld, bool drawNew)
 {
@@ -459,6 +459,8 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& WXUNUSED(oldPos),
         return false;
 
 #ifdef wxHAS_NATIVE_OVERLAY
+    wxUnusedVar(oldPos);
+
     wxDCOverlay dcoverlay( m_overlay, (wxWindowDC*) m_windowDC ) ;
     if ( eraseOld )
         dcoverlay.Clear() ;