diff options
author | Deron Johnson <deron.johnson@sun.com> | 2005-03-04 23:22:00 +0000 |
---|---|---|
committer | Deron Johnson <deron.johnson@sun.com> | 2005-03-04 23:22:00 +0000 |
commit | a01c5f9a00a8faad23051d8f715739c4e4ad1e84 (patch) | |
tree | d8633eef7ec0d2d8fbe545c03ad4335fd0d27589 | |
parent | eaee8d7ac3ec13fa3561b665f02db61a8dc83163 (diff) |
lg3d-dev-6-1-1-2: Fix bug 157: Stability: Escher events sometimes crosslg3d-rel-0-6-2lg3d-dev-0-6-2lg3d-dev-0-6-1-1
over to the wrong Display
-rw-r--r-- | dix/events.c | 39 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 22 | ||||
-rw-r--r-- | xkb/xkbPrKeyEv.c | 26 |
3 files changed, 53 insertions, 34 deletions
diff --git a/dix/events.c b/dix/events.c index 33392af8a..5b5ea3b72 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.6.4.1.10.2 2005/01/12 00:37:52 deronj Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.6.4.2 2005/01/20 23:47:25 deronj Exp $ */ /* $XFree86: xc/programs/Xserver/dix/events.c,v 3.51 2004/01/12 17:04:52 tsi Exp $ */ /************************************************************ @@ -3158,16 +3158,7 @@ ProcessKeyboardEvent (xE, keybd, count) { xeviekb = keybd; if(!rootWin) { -#ifdef LG3D - /* TEMP Workaround */ - WindowPtr pWin; - if (lgeDisplayServerIsAlive) { - xeviewin = pLgeDisplayServerPRWWin; - } - pWin = xeviewin->parent; -#else WindowPtr pWin = xeviewin->parent; -#endif /* LG3D */ while(pWin) { if(!pWin->parent) { rootWin = pWin->drawable.id; @@ -3466,6 +3457,29 @@ ProcessPointerEvent (xE, mouse, count) } #endif /* LG3D_EVENT_TEST_THROUGHPUT */ +#ifdef LG3D + /* TODO: bug: this doesn't handle synchronous grabs properly */ + if (lgeDisplayServerIsAlive && + !lgeDisplayServerClient->clientGone && + !lgeEventComesFromDS) { + xEvent *e = xE; + int i; + + for (i = 0; i < count; i++, e++) { + /* + ErrorF("Send event XS->DS, type = %d xy = %d, %d, state = 0x%x\n", + e->u.u.type, e->u.keyButtonPointer.rootX, + e->u.keyButtonPointer.rootY, + e->u.keyButtonPointer.state); + */ + + WriteToClient(lgeDisplayServerClient, sizeof(xEvent), (char *)e); + } + + return; + } +#endif /* LG3D */ + if (!syncEvents.playingEvents) NoticeTime(xE) XE_KBPTR.state = (butc->state | ( @@ -5236,10 +5250,11 @@ WriteEventsToClient(pClient, count, events) damev->area.x, damev->area.y, damev->area.width, damev->area.height); } else if (!damageEventsOnly) { - ErrorF("Send event %d to client %d, xy = %d, %d, event win = %d\n", + ErrorF("Send event %d to client %d, xy = %d, %d, event win = %d, state = 0x%x\n", ev->u.u.type, pClient->index, ev->u.keyButtonPointer.eventX, ev->u.keyButtonPointer.eventY, - ev->u.keyButtonPointer.event); + ev->u.keyButtonPointer.event, + ev->u.keyButtonPointer.state); if (ev->u.u.type == 4 || ev->u.u.type == 5) { ErrorF("Button detail = %d\n", ev->u.u.detail); } diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 6baf9ccbd..738b7c58c 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -111,10 +111,6 @@ #include "Xpoll.h" #include "xf86_OSproc.h" /* sigio stuff */ -#ifdef LG3D -#include "../../../Xext/lgeint.h" -#endif /* LG3D */ - /****************************************************************************** * debugging macro *****************************************************************************/ @@ -698,9 +694,7 @@ xf86eqEnqueue (xEvent *e) #ifdef XINPUT int count; -#ifndef LG3D xf86AssertBlockedSIGIO ("xf86eqEnqueue"); -#endif /* !LG3D */ switch (e->u.u.type) { case KeyPress: case KeyRelease: @@ -735,22 +729,6 @@ xf86eqEnqueue (xEvent *e) } #endif -#ifdef LG3D - if (lgeDisplayServerIsAlive && - !lgeDisplayServerClient->clientGone && - !lgeEventComesFromDS) { - - /* - ErrorF("Send event XS->DS, type = %d xy = %d, %d\n", - e->u.u.type, e->u.keyButtonPointer.rootX, - e->u.keyButtonPointer.rootY); - */ - - WriteToClient(lgeDisplayServerClient, sizeof(xEvent), (char *)e); - return; - } -#endif /* LG3D */ - oldtail = xf86EventQueue.tail; isMotion = e->u.u.type == MotionNotify; if (isMotion && xf86EventQueue.lastMotion && oldtail != xf86EventQueue.head) { diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 43288d3e9..53dca0ce1 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -37,6 +37,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "XKBsrv.h" #include <ctype.h> +#ifdef LG3D +#include "../Xext/lgeint.h" +#endif /* LG3D */ /***====================================================================***/ @@ -49,6 +52,29 @@ int key; XkbBehavior behavior; unsigned ndx; +#ifdef LG3D + /* TODO: bug: this doesn't handle synchronous grabs properly */ + if (lgeDisplayServerIsAlive && + !lgeDisplayServerClient->clientGone && + !lgeEventComesFromDS) { + xEvent *e = xE; + int i; + + for (i = 0; i < count; i++, e++) { + /* + ErrorF("Send event XS->DS, type = %d xy = %d, %d, state = 0x%x\n", + e->u.u.type, e->u.keyButtonPointer.rootX, + e->u.keyButtonPointer.rootY, + e->u.keyButtonPointer.state); + */ + + WriteToClient(lgeDisplayServerClient, sizeof(xEvent), (char *)e); + } + + return; + } +#endif /* LG3D */ + xkbi= keyc->xkbInfo; key= xE->u.u.detail; #ifdef DEBUG |