[Cocoa] TListView.GetItemAt returns wrong item when ShowColumnHeaders=true
- Lazarus/FPC Version: Lazarus 2.3.0 rmain-2_3-343-g0f5ed918 FPC 3.2.2 x86_64-darwin-cocoa
- Operating System: macOS Big Sur 11.5.2
- CPU / Bitness: 64 bit
When a TListView has ShowColumnHeaders enabled, getItemAt(X, Y) returns wrong item two rows below. When ShowColumnHeaders=false, the correct item is returned.
What did you expect
Correct item to be returned regardless of whether headers are visible. I have verified that this works properly in Windows.
Steps to reproduce
- Run the attached sample app listviewtest.zip.
- Secondary-click (two fingers or secondary mouse button) the second row in the list view.
- Observe the wrong row being selected.
- Now use the button to hide headers and try secondary-clicking again.
- Observe the right row being selected.