Xi: notify the clients when the device hierarchy has been changed.

This commit is contained in:
Peter Hutterer 2007-11-08 17:54:17 +10:30
parent cb75f09146
commit 676b26ca3e
2 changed files with 12 additions and 3 deletions

View File

@ -79,9 +79,11 @@ int
ProcXChangeDeviceHierarchy(ClientPtr client)
{
DeviceIntPtr ptr, keybd;
DeviceIntRec dummyDev;
xAnyHierarchyChangeInfo *any;
int required_len = sizeof(xChangeDeviceHierarchyReq);
char n;
deviceHierarchyChangedEvent ev;
REQUEST(xChangeDeviceHierarchyReq);
REQUEST_AT_LEAST_SIZE(xChangeDeviceHierarchyReq);
@ -226,6 +228,14 @@ ProcXChangeDeviceHierarchy(ClientPtr client)
any = (xAnyHierarchyChangeInfo*)((char*)any + any->length);
}
ev.type = GenericEvent;
ev.extension = IReqCode;
ev.length = 0;
ev.evtype = XI_DeviceHierarchyChangedNotify;
ev.time = GetTimeInMillis();
SendEventToAllWindows(&dummyDev, XI_DeviceHierarchyChangedMask,
(xEvent*)&ev, 1);
return Success;
}

View File

@ -137,8 +137,7 @@ Mask ExtExclusiveMasks[EMASKSIZE];
* Evtype is index, mask is value at index.
*/
static Mask xi_filters[3] = {
XI_PointerKeyboardPairingChangedMask,
XI_RandomStringMask,
XI_DeviceHierarchyChangedMask,
XI_RawDeviceEventMask,
};