Xi: notify the clients when the device hierarchy has been changed.
This commit is contained in:
parent
cb75f09146
commit
676b26ca3e
|
@ -79,9 +79,11 @@ int
|
||||||
ProcXChangeDeviceHierarchy(ClientPtr client)
|
ProcXChangeDeviceHierarchy(ClientPtr client)
|
||||||
{
|
{
|
||||||
DeviceIntPtr ptr, keybd;
|
DeviceIntPtr ptr, keybd;
|
||||||
|
DeviceIntRec dummyDev;
|
||||||
xAnyHierarchyChangeInfo *any;
|
xAnyHierarchyChangeInfo *any;
|
||||||
int required_len = sizeof(xChangeDeviceHierarchyReq);
|
int required_len = sizeof(xChangeDeviceHierarchyReq);
|
||||||
char n;
|
char n;
|
||||||
|
deviceHierarchyChangedEvent ev;
|
||||||
|
|
||||||
REQUEST(xChangeDeviceHierarchyReq);
|
REQUEST(xChangeDeviceHierarchyReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceHierarchyReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceHierarchyReq);
|
||||||
|
@ -226,6 +228,14 @@ ProcXChangeDeviceHierarchy(ClientPtr client)
|
||||||
any = (xAnyHierarchyChangeInfo*)((char*)any + any->length);
|
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;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,9 +137,8 @@ Mask ExtExclusiveMasks[EMASKSIZE];
|
||||||
* Evtype is index, mask is value at index.
|
* Evtype is index, mask is value at index.
|
||||||
*/
|
*/
|
||||||
static Mask xi_filters[3] = {
|
static Mask xi_filters[3] = {
|
||||||
XI_PointerKeyboardPairingChangedMask,
|
XI_DeviceHierarchyChangedMask,
|
||||||
XI_RandomStringMask,
|
XI_RawDeviceEventMask,
|
||||||
XI_RawDeviceEventMask,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dev_type
|
static struct dev_type
|
||||||
|
|
Loading…
Reference in New Issue