Ticket #14987 (closed defect: fixed)
wxKeyEvent::GetPosition always returning (-1,-1)
| Reported by: | tm | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | base | Version: | 2.9-svn |
| Keywords: | wxKeyEvent | Cc: | |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
Calling wxKeyEvent::GetPosition returns always wxPoint(-1,-1). Using GetX() and GetY() returns the correct mouse position. (wxWidgets from svn, using wxMSW)
How to reproduce: in sample/keyboard/keyboard.cpp, line 489
replace
, event.GetX()
, event.GetY()
with
, event.GetPosition().x
, event.GetPosition().y
When now running the keyboard example, column position contains always (-1,-1)
Probably introduced in changeset 72207.
Possible solution: wxKeyEvent::GetPosition needs to call InitPositionIfNecessary() before returning values.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

