]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
fixed serious bug in wxFont::operator== (ignored weight)
[wxWidgets.git] / src / generic / listctrl.cpp
index b556a2e8eb27fe50c09d56080533cb22728ca228..38ff1e693c40674e2d09770bf763ca54803abf1e 100644 (file)
@@ -2044,6 +2044,14 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
                                     : wxEVT_COMMAND_LIST_COL_RIGHT_CLICK,
                                 parent->GetId() );
                 le.SetEventObject( parent );
+                le.m_pointDrag = event.GetPosition();
+
+                // the position should be relative to the parent window, not
+                // this one for compatibility with MSW and common sense: the
+                // user code doesn't know anything at all about this header
+                // window, so why should it get positions relative to it?
+                le.m_pointDrag.y -= GetSize().y;
+
                 le.m_col = m_column;
                 parent->GetEventHandler()->ProcessEvent( le );
             }