Fix wxGetKeyState() on non-X11 wxGTK backends (e.g., Wayland)
wxGetKeyState() does not currently work on non-X11 GTK backends, and in some cases it has been reported to crash. It seems that the most likely use case for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use GTK+ calls to retrieve the modifier key state. Non-modifier keys are not currently implemented, update the documentation to mention this. Closes https://github.com/wxWidgets/wxWidgets/pull/322 (this is a combined backport of1033fb048d
,9f9c09e24a
anda18fe083cc
from master)
This commit is contained in:
committed by
Vadim Zeitlin
parent
fcb8497def
commit
98065821bb
@@ -372,6 +372,9 @@ wxString wxGetDisplayName();
|
||||
Even though there are virtual key codes defined for mouse buttons, they
|
||||
cannot be used with this function currently.
|
||||
|
||||
In wxGTK, this function can be only used with modifier keys (@c WXK_ALT, @c
|
||||
WXK_CONTROL and @c WXK_SHIFT) when not using X11 backend currently.
|
||||
|
||||
@header{wx/utils.h}
|
||||
*/
|
||||
bool wxGetKeyState(wxKeyCode key);
|
||||
|
Reference in New Issue
Block a user