(In reply to comment #8)
> > --- Comment #6 from Daniel Stone <email address hidden> 2008-05-29 03:20:01 PST ---
> > I think the only thing that makes sense is for XTest to use GKE to
> > generate events for the keyboard that last sent core events. Principle
> > of least surprise and all -- why mangle other keyboards?
>
> that would actually be easy now. MDs keep dev->u.lastSlave around, so we could
> just route through that. For 1.4, this would be slightly more complicated.
> First thought is to just add two fields to inputInfo.
possibly not so complicated -- what about the following patch:
diff --git a/dix/getevents.c b/dix/getevents.c
index 2fd4e54..79366f8 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -414,6 +414,10 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
CARD32 ms = 0;
deviceKeyButtonPointer *kbp = NULL;
+ if (pDev == inputInfo.keyboard)
+ pDev = dixLookupPrivate(&inputInfo.keyboard->devPrivates,
+ CoreDevicePrivateKey);
+
if (!events)
return 0;
(assuming all callers of GK{,V}E are happy with this.)
(In reply to comment #8)
> > --- Comment #6 from Daniel Stone <email address hidden> 2008-05-29 03:20:01 PST ---
> > I think the only thing that makes sense is for XTest to use GKE to
> > generate events for the keyboard that last sent core events. Principle
> > of least surprise and all -- why mangle other keyboards?
>
> that would actually be easy now. MDs keep dev->u.lastSlave around, so we could
> just route through that. For 1.4, this would be slightly more complicated.
> First thought is to just add two fields to inputInfo.
possibly not so complicated -- what about the following patch: atorEvents( xEvent *events, DeviceIntPtr pDev, int type, uttonPointer *kbp = NULL;
diff --git a/dix/getevents.c b/dix/getevents.c
index 2fd4e54..79366f8 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -414,6 +414,10 @@ GetKeyboardValu
CARD32 ms = 0;
deviceKeyB
+ if (pDev == inputInfo.keyboard) e(&inputInfo. keyboard- >devPrivates, teKey);
+ pDev = dixLookupPrivat
+ CoreDevicePriva
+
if (!events)
return 0;
(assuming all callers of GK{,V}E are happy with this.)