Define wxSetDetectableAutoRepeat() for X11-based ports only.
This function is not needed in wxGTK2 as GTK+ sets detectable auto-repeat on its own in gdk_display_open() anyhow, so move its implementation to src/x11/utilsx.cpp where it can be used by wxX11 and wxMotif which do need it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,18 +45,6 @@
|
||||
#include "gtk/gtk.h"
|
||||
#include "gdk/gdkx.h"
|
||||
|
||||
#ifdef HAVE_X11_XKBLIB_H
|
||||
/* under HP-UX and Solaris 2.6, at least, XKBlib.h defines structures with
|
||||
* field named "explicit" - which is, of course, an error for a C++
|
||||
* compiler. To be on the safe side, just redefine it everywhere. */
|
||||
#define explicit __wx_explicit
|
||||
|
||||
#include "X11/XKBlib.h"
|
||||
|
||||
#undef explicit
|
||||
#endif // HAVE_X11_XKBLIB_H
|
||||
|
||||
|
||||
#if wxUSE_DETECT_SM
|
||||
#include "X11/Xlib.h"
|
||||
#include "X11/SM/SMlib.h"
|
||||
@@ -80,22 +68,6 @@ void wxBell()
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Don't synthesize KeyUp events holding down a key and producing
|
||||
KeyDown events with autorepeat. */
|
||||
#ifdef HAVE_X11_XKBLIB_H
|
||||
bool wxSetDetectableAutoRepeat( bool flag )
|
||||
{
|
||||
Bool result;
|
||||
XkbSetDetectableAutoRepeat( GDK_DISPLAY(), flag, &result );
|
||||
return result; /* true if keyboard hardware supports this mode */
|
||||
}
|
||||
#else
|
||||
bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// display characterstics
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user