The position (mouse pos) returned by wxKeyEvent sometimes

was wrong, as it reported the position relative to the
    TLW (this is what a bug report claims, in any case).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-02-27 17:47:57 +00:00
parent bc8f7aeed2
commit c958d025fa
2 changed files with 4 additions and 0 deletions

View File

@@ -1000,6 +1000,8 @@ static void wxFillOtherKeyEventFields(wxKeyEvent& event,
#if wxUSE_UNICODE
event.m_uniChar = gdk_keyval_to_unicode(gdk_event->keyval);
#endif
wxGetMousePosition( &x, &y );
win->ScreenToClient( &x, &y );
event.m_x = x;
event.m_y = y;
event.SetEventObject( win );