mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-28 21:33:09 +00:00
input: store the master device's ID in the devPrivate for XTest devices.
Rather than storing a simple boolean in the devPrivate for XTest devices, store the actual master device's id (since it is constant for the life of the device anyway). Callers should use GetXtstDevice now instead of digging around in the devPrivates themselves. This patch allows for a cleanup in the creation of new master devices since GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
This commit is contained in:
parent
1bcc0d3c24
commit
0814f511d5
4 changed files with 64 additions and 77 deletions
10
Xext/xtest.c
10
Xext/xtest.c
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
extern int DeviceValuator;
|
||||
extern int DeviceMotionNotify;
|
||||
extern DevPrivateKey XTstDevicePrivateKey;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
|
|
@ -299,14 +298,7 @@ ProcXTestFakeInput(ClientPtr client)
|
|||
return BadValue;
|
||||
}
|
||||
|
||||
/* When faking core events through XTest, we always fake through the
|
||||
* virtual test device.
|
||||
*/
|
||||
for(it = inputInfo.devices; it ; it = it->next )
|
||||
if( !IsMaster(it) && it->u.master == dev &&
|
||||
dixLookupPrivate(&it->devPrivates, XTstDevicePrivateKey ))
|
||||
break;
|
||||
dev= it;
|
||||
dev = GetXtstDevice(dev);
|
||||
}
|
||||
|
||||
/* If the event has a time set, wait for it to pass */
|
||||
|
|
|
|||
Loading…
Reference in a new issue