]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Don't use invoking window in wxGTK wxMenuBar implementation.
[wxWidgets.git] / src / generic / grid.cpp
index 45cfa65c3f9cb638b1076f8b494e4c00639c3c73..d0675c4d8a2215fc8821925136a9c8fee5c0b222 100644 (file)
@@ -3765,6 +3765,8 @@ void wxGrid::DoGridDragEvent(wxMouseEvent& event, const wxGridCellCoords& coords
 
     if ( isFirstDrag )
     {
+        wxASSERT_MSG( !m_winCapture, "shouldn't capture the mouse twice" );
+
         m_winCapture = m_gridWin;
         m_winCapture->CaptureMouse();
     }
@@ -3944,6 +3946,14 @@ wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event),
 
 void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event)
 {
+    if ( event.Entering() || event.Leaving() )
+    {
+        // we don't care about these events but we must not reset m_isDragging
+        // if they happen so return before anything else is done
+        event.Skip();
+        return;
+    }
+
     const wxPoint pos = CalcUnscrolledPosition(event.GetPosition());
 
     // coordinates of the cell under mouse
@@ -3969,17 +3979,6 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event)
     m_isDragging = false;
     m_startDragPos = wxDefaultPosition;
 
-    // VZ: if we do this, the mode is reset to WXGRID_CURSOR_SELECT_CELL
-    //     immediately after it becomes WXGRID_CURSOR_RESIZE_ROW/COL under
-    //     wxGTK
-#if 0
-    if ( event.Entering() || event.Leaving() )
-    {
-        ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL);
-        m_gridWin->SetCursor( *wxSTANDARD_CURSOR );
-    }
-#endif // 0
-
     // deal with various button presses
     if ( event.IsButton() )
     {