From 8208b842b7dd3b30bafdd74147bdfa63bc00cc40 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 14:19:42 +0930 Subject: Xi: add IEventBase global variable. Stores event base for X Input events. --- Xi/exglobals.h | 1 + Xi/extinit.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Xi/exglobals.h b/Xi/exglobals.h index 4c23d84b4..0b1caf99c 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -37,6 +37,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define EXGLOBALS_H 1 extern int IReqCode; +extern int IEventBase; extern int BadDevice; extern int BadMode; extern int DeviceBusy; diff --git a/Xi/extinit.c b/Xi/extinit.c index a647b9e18..99ace898f 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -277,6 +277,7 @@ static int (*SProcIVector[])(ClientPtr) = { */ int IReqCode = 0; +int IEventBase = 0; int BadDevice = 0; static int BadEvent = 1; int BadMode = 2; @@ -885,6 +886,7 @@ RestoreExtensionEvents(void) int i, j; IReqCode = 0; + IEventBase = 0; for (i = 0; i < ExtEventIndex - 1; i++) { if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) @@ -1122,6 +1124,7 @@ XInputExtensionInit(void) SProcIDispatch, IResetProc, StandardMinorOpcode); if (extEntry) { IReqCode = extEntry->base; + IEventBase = extEntry->eventBase; AllExtensionVersions[IReqCode - 128] = thisversion; MakeDeviceTypeAtoms(); RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone); -- cgit v1.2.3