From 3b114f2603fc2adeec7f5f8f20fe4870afb8dff1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 25 Sep 2007 07:55:17 -0400 Subject: [PATCH] Input: Properly swap DevicePresenceNotify events. --- Xi/extinit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xi/extinit.c b/Xi/extinit.c index a61746e69..73bae5e85 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -929,6 +929,8 @@ SEventIDispatch(xEvent * from, xEvent * to) DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify); else if (type == ChangeDeviceNotify) DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify); + else if (type == DevicePresenceNotify) + DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify); else { FatalError("XInputExtension: Impossible event!\n"); } @@ -974,6 +976,7 @@ XInputExtensionInit(void) EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch; EventSwapVector[DeviceMappingNotify] = SEventIDispatch; EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; + EventSwapVector[DevicePresenceNotify] = SEventIDispatch; } else { FatalError("IExtensionInit: AddExtensions failed\n"); }