forked from enlightenment/efl
allow ecore_x to use auto-repeat detection - if its in xlib.
SVN revision: 38932
This commit is contained in:
parent
e3b5fa3f12
commit
5411f11877
|
@ -435,6 +435,40 @@ if ! test "x$have_ecore_x_xcb" = "xyes" ; then
|
|||
AC_SUBST(Xcursor_cflags)
|
||||
AC_SUBST(Xcursor_libs)
|
||||
|
||||
Xkb_libs=""
|
||||
Xkb_cflags=""
|
||||
use_Xkb="no"
|
||||
PCFLAGS=$CFLAGS
|
||||
CFLAGS="$x_cflags $x_includes"
|
||||
AC_CHECK_HEADER(X11/XKBlib.h,
|
||||
[
|
||||
AC_CHECK_LIB(X11, XkbSetDetectableAutoRepeat,
|
||||
[
|
||||
AC_DEFINE(ECORE_XKB, 1, [Build support for Xkb])
|
||||
Xkb_cflags=""
|
||||
Xkb_libs=""
|
||||
use_Xkb="yes"
|
||||
], [
|
||||
Xkb_cflags=""
|
||||
Xkb_libs=""
|
||||
use_Xkb="no"
|
||||
], [
|
||||
$x_libs
|
||||
]
|
||||
)
|
||||
], [
|
||||
Xkb_cflags=""
|
||||
Xkb_libs=""
|
||||
use_Xkb="no"
|
||||
], [
|
||||
#include <X11/XKBlib.h>
|
||||
]
|
||||
)
|
||||
CFLAGS=$PCFLAGS
|
||||
|
||||
AC_SUBST(Xkb_cflags)
|
||||
AC_SUBST(Xkb_libs)
|
||||
|
||||
ECORE_CHECK_X_EXTENSION([Xcomposite], [Xcomposite.h], [Xcomposite], [XCompositeQueryExtension])
|
||||
ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract])
|
||||
ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xdpms], [DPMSQueryExtension])
|
||||
|
@ -1027,6 +1061,7 @@ if test "x$have_ecore_x" = "xyes" ; then
|
|||
else
|
||||
echo " Ecore_X (Xlib backend).......: $have_ecore_x"
|
||||
echo " Xcursor....................: $use_Xcursor"
|
||||
echo " Xkb........................: $use_Xkb"
|
||||
echo " Xprint.....................: $use_xprint"
|
||||
echo " Xinerama...................: $use_xinerama"
|
||||
echo " Xrandr.....................: $use_xrandr"
|
||||
|
|
|
@ -5,6 +5,7 @@ if BUILD_ECORE_X_XLIB
|
|||
|
||||
AM_CPPFLAGS = \
|
||||
@Xcursor_cflags@ \
|
||||
@Xkb_cflags@ \
|
||||
@XDAMAGE_CFLAGS@ \
|
||||
@XCOMPOSITE_CFLAGS@ \
|
||||
@XDPMS_CFLAGS@ \
|
||||
|
@ -56,6 +57,7 @@ ecore_x_atoms.c
|
|||
|
||||
libecore_x_xlib_la_LIBADD = \
|
||||
@Xcursor_libs@ \
|
||||
@Xkb_libs@ \
|
||||
@XDAMAGE_LIBS@ \
|
||||
@XCOMPOSITE_LIBS@ \
|
||||
@XDPMS_LIBS@ \
|
||||
|
|
|
@ -279,7 +279,19 @@ ecore_x_init(const char *name)
|
|||
if (_ecore_x_event_damage_id)
|
||||
_ecore_x_event_handlers[_ecore_x_event_damage_id] = _ecore_x_event_handle_damage_notify;
|
||||
#endif
|
||||
|
||||
#ifdef ECORE_XKB
|
||||
// set x autorepeat detection to on. that means instead of
|
||||
// press-release-press-release-press-release
|
||||
// you get
|
||||
// press-press-press-press-press-release
|
||||
do
|
||||
{
|
||||
Bool works = 0;
|
||||
XkbSetDetectableAutoRepeat(_ecore_x_disp, 1, &works);
|
||||
}
|
||||
while (0);
|
||||
#endif
|
||||
|
||||
if (!ECORE_X_EVENT_KEY_DOWN)
|
||||
{
|
||||
ECORE_X_EVENT_KEY_DOWN = ecore_event_type_new();
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
#ifdef ECORE_XDPMS
|
||||
#include <X11/extensions/dpms.h>
|
||||
#endif
|
||||
#ifdef ECORE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
|
||||
#include "ecore_private.h"
|
||||
#include "Ecore_X.h"
|
||||
|
|
Loading…
Reference in New Issue