X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f84fb4ad9ec61894dba6f08c67a4e5079aee8537..ee3dd6dd5f7f4e081ae9a5ead179d0ca5b752759:/src/x11/utilsx.cpp diff --git a/src/x11/utilsx.cpp b/src/x11/utilsx.cpp index a635f8f7e8..335078fb05 100644 --- a/src/x11/utilsx.cpp +++ b/src/x11/utilsx.cpp @@ -4,7 +4,6 @@ // Author: Mattia Barbon // Modified by: // Created: 05/04/03 -// RCS-ID: $Id$ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -35,6 +34,8 @@ #include "wx/dcmemory.h" #endif +#include "wx/x11/private/wrapxkb.h" + // ---------------------------------------------------------------------------- // XShape code // ---------------------------------------------------------------------------- @@ -236,3 +237,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 +} +