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:
@@ -1444,6 +1444,9 @@ public:
|
||||
//@{
|
||||
/**
|
||||
Obtains the position (in client coordinates) at which the key was pressed.
|
||||
|
||||
Notice that this position is simply the current mouse pointer position
|
||||
and has no special relationship to the key event itself.
|
||||
*/
|
||||
wxPoint GetPosition() const;
|
||||
void GetPosition(long* x, long* y) const;
|
||||
@@ -1502,11 +1505,15 @@ public:
|
||||
|
||||
/**
|
||||
Returns the X position (in client coordinates) of the event.
|
||||
|
||||
@see GetPosition()
|
||||
*/
|
||||
wxCoord GetX() const;
|
||||
|
||||
/**
|
||||
Returns the Y position (in client coordinates) of the event.
|
||||
|
||||
@see GetPosition()
|
||||
*/
|
||||
wxCoord GetY() const;
|
||||
|
||||
|
Reference in New Issue
Block a user