diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-08 17:54:17 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-09 14:31:54 +1030 |
commit | 676b26ca3e9b142cf007af3f439aa1993f2247c4 (patch) | |
tree | b5e05c3b3b742bf83bca1130a6cf15bd113cfc67 /Xi | |
parent | cb75f09146a3c17b1a67b636bbf7229c65c83b35 (diff) |
Xi: notify the clients when the device hierarchy has been changed.
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/chdevhier.c | 10 | ||||
-rw-r--r-- | Xi/extinit.c | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index c916c0f47..338c07433 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -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; } diff --git a/Xi/extinit.c b/Xi/extinit.c index de2653f43..0ecb421f0 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -137,9 +137,8 @@ Mask ExtExclusiveMasks[EMASKSIZE]; * Evtype is index, mask is value at index. */ static Mask xi_filters[3] = { - XI_PointerKeyboardPairingChangedMask, - XI_RandomStringMask, - XI_RawDeviceEventMask, + XI_DeviceHierarchyChangedMask, + XI_RawDeviceEventMask, }; static struct dev_type |