diff options
author | marha <marha@users.sourceforge.net> | 2010-01-07 14:53:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-01-07 14:53:48 +0000 |
commit | d5ac51b006c039894e4e35102a8e182d21a52efc (patch) | |
tree | c01c6a3e0155d887b99d15962c4e3cfeee3746ad | |
parent | e76fe637326278601890dd11749ea2c40a26f550 (diff) | |
parent | 20f59c125afe31a8bdb0ae6a74dd408e5fa00237 (diff) | |
download | vcxsrv-d5ac51b006c039894e4e35102a8e182d21a52efc.tar.gz vcxsrv-d5ac51b006c039894e4e35102a8e182d21a52efc.tar.bz2 vcxsrv-d5ac51b006c039894e4e35102a8e182d21a52efc.zip |
svn merge ^/branches/released
(Merged in record 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 8d56aa270..140a353cc 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1033,16 +1033,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 1a78c5499..781cc98e4 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -1134,11 +1134,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
@@ -1148,14 +1149,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; |