Xi: add IEventBase global variable. Stores event base for X Input events.
This commit is contained in:
		
							parent
							
								
									46340b7406
								
							
						
					
					
						commit
						8208b842b7
					
				| 
						 | 
					@ -37,6 +37,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
#define EXGLOBALS_H 1
 | 
					#define EXGLOBALS_H 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern int IReqCode;
 | 
					extern int IReqCode;
 | 
				
			||||||
 | 
					extern int IEventBase;
 | 
				
			||||||
extern int BadDevice;
 | 
					extern int BadDevice;
 | 
				
			||||||
extern int BadMode;
 | 
					extern int BadMode;
 | 
				
			||||||
extern int DeviceBusy;
 | 
					extern int DeviceBusy;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -277,6 +277,7 @@ static int (*SProcIVector[])(ClientPtr) = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int IReqCode = 0;
 | 
					int IReqCode = 0;
 | 
				
			||||||
 | 
					int IEventBase = 0;
 | 
				
			||||||
int BadDevice = 0;
 | 
					int BadDevice = 0;
 | 
				
			||||||
static int BadEvent = 1;
 | 
					static int BadEvent = 1;
 | 
				
			||||||
int BadMode = 2;
 | 
					int BadMode = 2;
 | 
				
			||||||
| 
						 | 
					@ -885,6 +886,7 @@ RestoreExtensionEvents(void)
 | 
				
			||||||
    int i, j;
 | 
					    int i, j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    IReqCode = 0;
 | 
					    IReqCode = 0;
 | 
				
			||||||
 | 
					    IEventBase = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (i = 0; i < ExtEventIndex - 1; i++) {
 | 
					    for (i = 0; i < ExtEventIndex - 1; i++) {
 | 
				
			||||||
	if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128))
 | 
						if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128))
 | 
				
			||||||
| 
						 | 
					@ -1122,6 +1124,7 @@ XInputExtensionInit(void)
 | 
				
			||||||
			    SProcIDispatch, IResetProc, StandardMinorOpcode);
 | 
								    SProcIDispatch, IResetProc, StandardMinorOpcode);
 | 
				
			||||||
    if (extEntry) {
 | 
					    if (extEntry) {
 | 
				
			||||||
	IReqCode = extEntry->base;
 | 
						IReqCode = extEntry->base;
 | 
				
			||||||
 | 
						IEventBase = extEntry->eventBase;
 | 
				
			||||||
	AllExtensionVersions[IReqCode - 128] = thisversion;
 | 
						AllExtensionVersions[IReqCode - 128] = thisversion;
 | 
				
			||||||
	MakeDeviceTypeAtoms();
 | 
						MakeDeviceTypeAtoms();
 | 
				
			||||||
	RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone);
 | 
						RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue