Commit 990cf5b2 authored by Andrew Eikum's avatar Andrew Eikum Committed by Peter Hutterer

dix: Send KeyPress and KeyRelease events to the XACE_KEY_AVAIL hook

While it's documented in the XACE spec, the XACE_KEY_AVAIL hook is
currently never actually invoked by the xserver.

This hook was added in 13c6713c (25 Aug 2006), but as the keyboard
processing was moved into XKB, the hook was forgotten and silently
dropped. The code calling this hook was removed by 7af53799 (4 Jan
2009), but it was probably already unused before that.

This patch re-adds support for this hook. The "count" hook parameter is
Signed-off-by: 's avatarAndrew Eikum <>
Reviewed-by: 's avatarPeter Hutterer <>
Signed-off-by: 's avatarPeter Hutterer <>
parent 5dc2a9aa
......@@ -1730,6 +1730,18 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
/* 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);
if (DeviceEventCallback && !syncEvents.playingEvents) {
DeviceEventInfoRec eventinfo;
SpritePtr pSprite = device->spriteInfo->sprite;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment