diff options
author | marha <marha@users.sourceforge.net> | 2010-01-07 14:43:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-01-07 14:43:29 +0000 |
commit | 20f59c125afe31a8bdb0ae6a74dd408e5fa00237 (patch) | |
tree | 93fc4a87d462f722360911761986b031add1f5ae | |
parent | 163827567b71b0763a4c1a7104159cd08b5c2d95 (diff) | |
download | vcxsrv-20f59c125afe31a8bdb0ae6a74dd408e5fa00237.tar.gz vcxsrv-20f59c125afe31a8bdb0ae6a74dd408e5fa00237.tar.bz2 vcxsrv-20f59c125afe31a8bdb0ae6a74dd408e5fa00237.zip |
Added patches for bug http://bugs.freedesktop.org/show_bug.cgi?id=20500
0001-dix-EventToCore-needs-to-copy-the-root-window-too.patch
0001-Re-enable-the-RECORD-extension.patch
-rw-r--r-- | xorg-server/Xi/exevents.c | 37 | ||||
-rw-r--r-- | xorg-server/dix/eventconvert.c | 1 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 32 | ||||
-rw-r--r-- | xorg-server/record/record.c | 8 | ||||
-rw-r--r-- | xorg-server/test/input.c | 4 |
5 files changed, 58 insertions, 24 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index cb2452bb8..5f8e1fac5 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1031,16 +1031,39 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) break; } -#if 0 - /* FIXME: I'm broken. Please fix me. Thanks */ if (DeviceEventCallback) { - DeviceEventInfoRec eventinfo; + DeviceEventInfoRec eventinfo; + SpritePtr pSprite = device->spriteInfo->sprite; + xEvent *xi_events = NULL; + int count; + + /* see comment in EnqueueEvents regarding the next three lines */ + if (ev->any.type == ET_Motion) + ev->device_event.root = + WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; + + /* SDs send XI events only. MDs send both an XI event and a core + * event. + */ + EventToXI(ev, &xi_events, &count); + + eventinfo.events = (xEventPtr)xi_events; + eventinfo.count = count; + ErrorF("POE xi root is %lx\n", xi_events->u.keyButtonPointer.root); + CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); + xfree(xi_events); + + if (IsMaster(device)) + { + xEvent core; + EventToCore(ev, &core); + eventinfo.events = (xEventPtr)&core; + eventinfo.count = 1; + ErrorF("POE core root is %lx\n", core.u.keyButtonPointer.root); + CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); + } - eventinfo.events = (xEventPtr) xE; - eventinfo.count = count; - CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); } -#endif grab = device->deviceGrab.grab; switch(event->type) diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c index e25f3ee97..878dba576 100644 --- a/xorg-server/dix/eventconvert.c +++ b/xorg-server/dix/eventconvert.c @@ -119,6 +119,7 @@ EventToCore(InternalEvent *event, xEvent *core) core->u.keyButtonPointer.rootX = e->root_x; core->u.keyButtonPointer.rootY = e->root_y; core->u.keyButtonPointer.state = e->corestate; + core->u.keyButtonPointer.root = e->root; EventSetKeyRepeatFlag(core, (e->type == ET_KeyPress && e->key_repeat)); } break; diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 85c8f9abc..b5c88802c 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -1131,11 +1131,12 @@ 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 *xi_events = NULL; + int count; + /* 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 @@ -1145,14 +1146,29 @@ 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 = + + if (ev->any.type == ET_Motion) + ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; - eventinfo.events = xE; - eventinfo.count = nevents; - CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); + + EventToXI(ev, &xi_events, &count); + + eventinfo.events = (xEventPtr)xi_events; + eventinfo.count = count; + CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); + xfree(xi_events); + + if (IsMaster(device)) + { + xEvent core; + EventToCore(ev, &core); + eventinfo.events = (xEventPtr)&core; + eventinfo.count = 1; + CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); + } + } -#endif + if (event->type == ET_Motion) { #ifdef PANORAMIX diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c index 242544f5d..0ec92e167 100644 --- a/xorg-server/record/record.c +++ b/xorg-server/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, "RecordContext"); @@ -2895,6 +2888,5 @@ RecordExtensionInit(void) } RecordErrorBase = extentry->errorBase; -#endif } /* RecordExtensionInit */ diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c index 2de55bc63..63d1a1801 100644 --- a/xorg-server/test/input.c +++ b/xorg-server/test/input.c @@ -153,6 +153,7 @@ static void dix_event_to_core(int type) int rc; int state; int detail; + const int ROOT_WINDOW_ID = 0x100; /* EventToCore memsets the event to 0 */ #define test_event() \ @@ -165,7 +166,7 @@ static void dix_event_to_core(int type) g_assert(core.u.keyButtonPointer.state == state); \ g_assert(core.u.keyButtonPointer.eventX == 0); \ g_assert(core.u.keyButtonPointer.eventY == 0); \ - g_assert(core.u.keyButtonPointer.root == 0); \ + g_assert(core.u.keyButtonPointer.root == ROOT_WINDOW_ID); \ g_assert(core.u.keyButtonPointer.event == 0); \ g_assert(core.u.keyButtonPointer.child == 0); \ g_assert(core.u.keyButtonPointer.sameScreen == FALSE); @@ -181,6 +182,7 @@ static void dix_event_to_core(int type) ev.time = time; ev.root_y = x; ev.root_x = y; + ev.root = ROOT_WINDOW_ID; ev.corestate = state; ev.detail.key = detail; |