]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/utilsx.cpp
Show full screen windows with WS_POPUP style in wxMSW.
[wxWidgets.git] / src / x11 / utilsx.cpp
index 27eb3c2725867a1ce771d4da5719873de6ead3cf..335078fb05892ea584436cf7338ec4e718fd621d 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Mattia Barbon
 // Modified by:
 // Created:     05/04/03
 // Author:      Mattia Barbon
 // Modified by:
 // Created:     05/04/03
-// RCS-ID:      $Id$
 // Copyright:   (c) Mattia Barbon
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) Mattia Barbon
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __VMS
 #define XShapeQueryExtension XSHAPEQUERYEXTENSION
 
 #ifdef __VMS
 #define XShapeQueryExtension XSHAPEQUERYEXTENSION
-#define XtDisplay XTDISPLAY
 #endif
 
 #include "wx/x11/privx.h"
 
 #ifdef HAVE_XSHAPE
 #endif
 
 #include "wx/x11/privx.h"
 
 #ifdef HAVE_XSHAPE
-#ifdef __VMS
-# include "wx/vms_x_fix.h"
-# include <X11/shape.h>
-#else
-# include <X11/extensions/shape.h>
-#endif
-#include "wx/region.h"
-#include "wx/bitmap.h"
-#include "wx/dcmemory.h"
+
+    #ifndef WX_PRECOMP
+        #include "wx/bitmap.h"
+        #include "wx/region.h"
+    #endif
+
+    #ifdef __VMS
+        #include "wx/vms_x_fix.h"
+        #include <X11/shape.h>
+    #else
+        #include <X11/extensions/shape.h>
+    #endif
+
+    #include "wx/dcmemory.h"
 #endif
 
 #endif
 
+#include "wx/x11/private/wrapxkb.h"
+
 // ----------------------------------------------------------------------------
 // XShape code
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // XShape code
 // ----------------------------------------------------------------------------
@@ -54,14 +59,14 @@ bool wxDoSetShape( Display* xdisplay,
     else
     {
         // wxRegion::ConvertToBitmap gives us the wrong Pixmap:
     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();
         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);
         dc.SetBackground(*wxWHITE_BRUSH);
         dc.Clear();
         dc.SelectObject(wxNullBitmap);
@@ -232,3 +237,18 @@ void wxXVisualInfo::Init( Display* dpy, XVisualInfo* vi )
 }
 
 #endif // !wxUSE_NANOX
 }
 
 #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
+}
+