Xi: advance by the right number of bytes when trawling XI2 event masks.
The wire layout is [struct xXIEventMask][mask bytes]. So the pointer needs to not only be advanced by the mask bytes, but also by the size of the struct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									b395da91c5
								
							
						
					
					
						commit
						b377994336
					
				|  | @ -103,6 +103,7 @@ ProcXISelectEvent(ClientPtr client) | |||
|         } | ||||
| 
 | ||||
|         evmask = (xXIEventMask*)(((unsigned char*)evmask) + evmask->mask_len * 4); | ||||
|         evmask++; | ||||
|     } | ||||
| 
 | ||||
|     /* Set masks on window */ | ||||
|  | @ -119,6 +120,7 @@ ProcXISelectEvent(ClientPtr client) | |||
|             dixLookupDevice(&dev, evmask->deviceid, client, DixReadAccess); | ||||
|         XISetEventMask(dev, win, client, evmask->mask_len * 4, (unsigned char*)&evmask[1]); | ||||
|         evmask = (xXIEventMask*)(((unsigned char*)evmask) + evmask->mask_len * 4); | ||||
|         evmask++; | ||||
|     } | ||||
| 
 | ||||
|     RecalculateDeliverableEvents(win); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue