summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-03 15:07:23 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-22 15:56:52 +1000
commit3a077f246e9ac07a37c1b01c3d321e0f5ceb4153 (patch)
tree5fcbadd5265c9c3495b164e4140786a58164b8e7 /xkb
parent4b376ddeb4f3c9d9d279ffd2946d88edd5af4cfc (diff)
input: provide a single function to init DeviceEvents to 0
getevents.c already had that function, but XKB was manually initializing it, causing bugs when the event structure was updated in one place but not the other. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbAccessX.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 12fe2a1f5..4115ff27d 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -124,15 +124,11 @@ AccessXKeyboardEvent(DeviceIntPtr keybd,
Bool isRepeat)
{
DeviceEvent event;
- memset(&event, 0, sizeof(DeviceEvent));
- event.header = ET_Internal;
+
+ init_device_event(&event, keybd, GetTimeInMillis());
event.type = type;
event.detail.key = keyCode;
- event.time = GetTimeInMillis();
- event.length = sizeof(DeviceEvent);
event.key_repeat = isRepeat;
- event.sourceid = keybd->id;
- event.deviceid = keybd->id;
if (xkbDebugFlags&0x8) {
DebugF("[xkb] AXKE: Key %d %s\n", keyCode,