X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0bca03736369e836cce9297509505c5972e775dd..88932ec82d048d006cdc81bd309f5e59aee799ac:/src/x11/utilsx.cpp?ds=sidebyside diff --git a/src/x11/utilsx.cpp b/src/x11/utilsx.cpp index ff17f168e7..147915ba20 100644 --- a/src/x11/utilsx.cpp +++ b/src/x11/utilsx.cpp @@ -14,7 +14,6 @@ #ifdef __VMS #define XShapeQueryExtension XSHAPEQUERYEXTENSION -#define XtDisplay XTDISPLAY #endif #include "wx/x11/privx.h" @@ -23,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/bitmap.h" + #include "wx/region.h" #endif #ifdef __VMS @@ -32,10 +32,11 @@ #include #endif - #include "wx/region.h" #include "wx/dcmemory.h" #endif +#include "wx/x11/private/wrapxkb.h" + // ---------------------------------------------------------------------------- // XShape code // ---------------------------------------------------------------------------- @@ -59,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); @@ -237,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 +} +