diff options
author | Chris Dekter <cdekter@gmail.com> | 2009-10-28 12:51:58 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-10-28 12:54:39 +1000 |
commit | 528fad96f49a8c6586d6b94edc610ce1cc8bcc7c (patch) | |
tree | 14da55f2f01f26554dbd8393e3fb9c1a33af7b3a | |
parent | 50a5c32430a5267f2a05656d2417f9a8a44d8b97 (diff) |
Re-enable RECORDrecord
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | Xi/exevents.c | 12 | ||||
-rw-r--r-- | dix/events.c | 19 | ||||
-rw-r--r-- | record/record.c | 8 |
3 files changed, 18 insertions, 21 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index cb2452bb8..080d033cb 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1031,16 +1031,18 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) break; } -#if 0 - /* FIXME: I'm broken. Please fix me. Thanks */ if (DeviceEventCallback) { DeviceEventInfoRec eventinfo; + xEvent xE; - eventinfo.events = (xEventPtr) xE; - eventinfo.count = count; + /* TODO check return value of EventToCore() */ + EventToCore(ev, &xE); + + eventinfo.events = (xEventPtr) &xE; + eventinfo.count = 1; CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); } -#endif + grab = device->deviceGrab.grab; switch(event->type) diff --git a/dix/events.c b/dix/events.c index d070a4c6f..df7bd6378 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1141,11 +1141,13 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) event->type == ET_KeyRelease) AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key); -#if 0 - /* FIXME: I'm broken now. Please fix me. */ if (DeviceEventCallback) { DeviceEventInfoRec eventinfo; + xEvent xE; + /* TODO check return value of EventToCore() */ + EventToCore(ev, &xE); + /* The RECORD spec says that the root window field of motion events * must be valid. At this point, it hasn't been filled in yet, so * we do it here. The long expression below is necessary to get @@ -1155,14 +1157,15 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) * the data that GetCurrentRootWindow relies on hasn't been * updated yet. */ - if (xE->u.u.type == DeviceMotionNotify) - XE_KBPTR.root = - WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; - eventinfo.events = xE; - eventinfo.count = nevents; + + if (xE.u.u.type == DeviceMotionNotify) + xE.u.keyButtonPointer.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; + + eventinfo.events = &xE; + eventinfo.count = 1; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); } -#endif + if (event->type == ET_Motion) { #ifdef PANORAMIX diff --git a/record/record.c b/record/record.c index b94b4ae18..5abca2492 100644 --- a/record/record.c +++ b/record/record.c @@ -2866,13 +2866,6 @@ RecordCloseDown(ExtensionEntry *extEntry) void RecordExtensionInit(void) { - /* FIXME Record is currently broken. Dont initialize it so that clients - * that require it can bail out correctly rather than waiting for stuff - * that'll never happen */ - ErrorF("record: RECORD extension enabled at configure time.\n"); - ErrorF("record: This extension is known to be broken, disabling extension now..\n"); - ErrorF("record: http://bugs.freedesktop.org/show_bug.cgi?id=20500\n"); -#if 0 ExtensionEntry *extentry; RTContext = CreateNewResourceType(RecordDeleteContext); @@ -2895,6 +2888,5 @@ RecordExtensionInit(void) } RecordErrorBase = extentry->errorBase; -#endif } /* RecordExtensionInit */ |