input: introduce partial class copying depending on the event.

Copying all classes into the master device has drawbacks for hybrid devices
(devices that are both mice and keyboards). If such a device posts an event,
it's key classes are moved into the VCP. The key event itself is unaffected
by keyboard grabs and the like.

Partial class copying copies depending on the event and copies the classes
into the right master device (i.e. the VCK for key events, the VCP for
pointer events).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2009-05-20 10:55:03 +10:00
parent bc63c8a457
commit ebe45e1a72
7 changed files with 210 additions and 156 deletions

View File

@@ -412,7 +412,8 @@ extern _X_EXPORT void FreeEventList(EventListPtr list, int num_events);
extern void CreateClassesChangedEvent(EventListPtr event,
DeviceIntPtr master,
DeviceIntPtr slave);
DeviceIntPtr slave,
int type);
extern int GetPointerEvents(
EventListPtr events,
DeviceIntPtr pDev,
@@ -480,7 +481,8 @@ extern int AllocDevicePair(ClientPtr client,
DeviceIntPtr* keybd,
Bool master);
extern void DeepCopyDeviceClasses(DeviceIntPtr from,
DeviceIntPtr to);
DeviceIntPtr to,
DeviceChangedEvent *dce);
/* Helper functions. */
extern int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,