X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f84fb4ad9ec61894dba6f08c67a4e5079aee8537..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/x11/utilsx.cpp diff --git a/src/x11/utilsx.cpp b/src/x11/utilsx.cpp index a635f8f7e8..147915ba20 100644 --- a/src/x11/utilsx.cpp +++ b/src/x11/utilsx.cpp @@ -35,6 +35,8 @@ #include "wx/dcmemory.h" #endif +#include "wx/x11/private/wrapxkb.h" + // ---------------------------------------------------------------------------- // XShape code // ---------------------------------------------------------------------------- @@ -236,3 +238,18 @@ void wxXVisualInfo::Init( Display* dpy, XVisualInfo* vi ) } #endif // !wxUSE_NANOX + +/* Don't synthesize KeyUp events holding down a key and producing + KeyDown events with autorepeat. */ +bool wxSetDetectableAutoRepeat( bool flag ) +{ +#ifdef HAVE_X11_XKBLIB_H + Bool result; + XkbSetDetectableAutoRepeat( (Display *)wxGetDisplay(), flag, &result ); + return result; /* true if keyboard hardware supports this mode */ +#else + wxUnusedVar(flag); + return false; +#endif +} +