Don't eagerly set wxKeyEvent position fields.
This results in a noticeable delay when using wxGTK via a remote X11 connection for every key event as a round trip to server is needed to get the mouse pointer position every time a key is pressed or released. Only provide the position on demand. And explain that it's actually not very useful as it's simply the same as the current mouse position. Closes #14361. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -711,8 +711,6 @@ static void wxFillOtherKeyEventFields(wxKeyEvent& event,
|
||||
event.m_rawCode = (wxUint32) gdk_event->keyval;
|
||||
event.m_rawFlags = gdk_event->hardware_keycode;
|
||||
|
||||
wxGetMousePosition(&event.m_x, &event.m_y);
|
||||
win->ScreenToClient(&event.m_x, &event.m_y);
|
||||
event.SetEventObject( win );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user