X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/455f7c8205e5dc29d99026b158ae0a394dccc839..07aaf32633ecf18ec3edfbb41793a112914792d0:/src/x11/utilsx.cpp?ds=sidebyside diff --git a/src/x11/utilsx.cpp b/src/x11/utilsx.cpp index 9bc793e343..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 // ---------------------------------------------------------------------------- @@ -58,14 +60,14 @@ bool wxDoSetShape( Display* xdisplay, else { // wxRegion::ConvertToBitmap gives us the wrong Pixmap: - // polichrome and with black and whire reversed + // polychrome and with black and white reversed wxRect box = region.GetBox(); wxBitmap bmp(box.GetRight(), box.GetBottom(), 1); wxMemoryDC dc; dc.SelectObject(bmp); dc.SetBackground(*wxBLACK_BRUSH); dc.Clear(); - dc.SetClippingRegion(region); + dc.SetDeviceClippingRegion(region); dc.SetBackground(*wxWHITE_BRUSH); dc.Clear(); dc.SelectObject(wxNullBitmap); @@ -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 +} +