Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
commit
84128c10bb
15
Xext/xace.c
15
Xext/xace.c
@ -213,6 +213,21 @@ XaceHook(int hook, ...)
|
||||
return prv ? *prv : Success;
|
||||
}
|
||||
|
||||
/* XaceHookIsSet
|
||||
*
|
||||
* Utility function to determine whether there are any callbacks listening on a
|
||||
* particular XACE hook.
|
||||
*
|
||||
* Returns non-zero if there is a callback, zero otherwise.
|
||||
*/
|
||||
int
|
||||
XaceHookIsSet(int hook)
|
||||
{
|
||||
if (hook < 0 || hook >= XACE_NUM_HOOKS)
|
||||
return 0;
|
||||
return XaceHooks[hook] != NULL;
|
||||
}
|
||||
|
||||
/* XaceCensorImage
|
||||
*
|
||||
* Called after pScreen->GetImage to prevent pieces or trusted windows from
|
||||
|
@ -65,6 +65,9 @@ extern _X_EXPORT int XaceHook(int /*hook */ ,
|
||||
... /*appropriate args for hook */
|
||||
);
|
||||
|
||||
/* determine whether any callbacks are present for the XACE hook */
|
||||
extern _X_EXPORT int XaceHookIsSet(int hook);
|
||||
|
||||
/* Special-cased hook functions
|
||||
*/
|
||||
extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major);
|
||||
|
@ -1590,7 +1590,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||
if (!ti) {
|
||||
DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n",
|
||||
dev->name, type, touchid);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* if emulate_pointer is set, emulate the motion event right
|
||||
@ -1624,6 +1624,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||
if (ev->any.type == ET_TouchEnd)
|
||||
TouchEndTouch(dev, ti);
|
||||
|
||||
out:
|
||||
if (emulate_pointer)
|
||||
UpdateDeviceState(dev, &ev->device_event);
|
||||
}
|
||||
@ -1730,6 +1731,18 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||
break;
|
||||
}
|
||||
|
||||
/* send KeyPress and KeyRelease events to XACE plugins */
|
||||
if (XaceHookIsSet(XACE_KEY_AVAIL) &&
|
||||
(event->type == ET_KeyPress || event->type == ET_KeyRelease)) {
|
||||
xEvent *core;
|
||||
int count;
|
||||
|
||||
if (EventToCore(ev, &core, &count) == Success && count > 0) {
|
||||
XaceHook(XACE_KEY_AVAIL, core, device, 0);
|
||||
free(core);
|
||||
}
|
||||
}
|
||||
|
||||
if (DeviceEventCallback && !syncEvents.playingEvents) {
|
||||
DeviceEventInfoRec eventinfo;
|
||||
SpritePtr pSprite = device->spriteInfo->sprite;
|
||||
|
53
configure.ac
53
configure.ac
@ -2337,6 +2337,33 @@ if test "$KDRIVE" = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
*linux*)
|
||||
KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la'
|
||||
KDRIVELINUX=yes
|
||||
if test "x$KDRIVE_EVDEV" = xauto; then
|
||||
KDRIVE_EVDEV=yes
|
||||
fi
|
||||
if test "x$KDRIVE_KBD" = xauto; then
|
||||
KDRIVE_KBD=yes
|
||||
fi
|
||||
if test "x$KDRIVE_MOUSE" = xauto; then
|
||||
KDRIVE_MOUSE=yes
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "x$KDRIVE_EVDEV" = xauto; then
|
||||
KDRIVE_EVDEV=no
|
||||
fi
|
||||
if test "x$KDRIVE_KBD" = xauto; then
|
||||
KDRIVE_KBD=no
|
||||
fi
|
||||
if test "x$KDRIVE_MOUSE" = xauto; then
|
||||
KDRIVE_MOUSE=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$KDRIVE_KBD" = xyes; then
|
||||
AC_DEFINE(KDRIVE_KBD, 1, [Enable KDrive kbd driver])
|
||||
fi
|
||||
@ -2378,32 +2405,6 @@ if test "$KDRIVE" = yes; then
|
||||
|
||||
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
|
||||
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
|
||||
case $host_os in
|
||||
*linux*)
|
||||
KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la'
|
||||
KDRIVELINUX=yes
|
||||
if test "x$KDRIVE_EVDEV" = xauto; then
|
||||
KDRIVE_EVDEV=yes
|
||||
fi
|
||||
if test "x$KDRIVE_KBD" = xauto; then
|
||||
KDRIVE_KBD=yes
|
||||
fi
|
||||
if test "x$KDRIVE_MOUSE" = xauto; then
|
||||
KDRIVE_MOUSE=yes
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "x$KDRIVE_EVDEV" = xauto; then
|
||||
KDRIVE_EVDEV=no
|
||||
fi
|
||||
if test "x$KDRIVE_KBD" = xauto; then
|
||||
KDRIVE_KBD=no
|
||||
fi
|
||||
if test "x$KDRIVE_MOUSE" = xauto; then
|
||||
KDRIVE_MOUSE=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
KDRIVE_MAIN_LIB="$MAIN_LIB"
|
||||
KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB"
|
||||
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
|
||||
|
Loading…
Reference in New Issue
Block a user