X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a816d95815bc4b77f860e88e8f12bf3e9adab10..e6adf05834e880312efa3d59914ecc1d4f5f78a6:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index b556a2e8eb..38ff1e693c 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -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 ); }