dix: always init the full button map to default values (#22594)
Master devices must have the standard button map applied for all buttons to ensure buttons larger than 7 (the default for MDs) are mapped appropriately. We can't copy the button map from SDs to MDs since that breaks the chained button mapping. However, by ensuring all buttons (even non-existing ones) are mapped, devices that send such buttons continue to work. X.Org Bug 22594 <http://bugs.freedesktop.org/show_bug.cgi?id=22594> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									744bb55982
								
							
						
					
					
						commit
						183c075d2f
					
				| 
						 | 
				
			
			@ -1172,6 +1172,8 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
 | 
			
		|||
    butc->sourceid = dev->id;
 | 
			
		||||
    for (i = 1; i <= numButtons; i++)
 | 
			
		||||
	butc->map[i] = map[i];
 | 
			
		||||
    for (i = numButtons + 1; i < MAP_LENGTH; i++)
 | 
			
		||||
        butc->map[i] = i;
 | 
			
		||||
    memcpy(butc->labels, labels, numButtons * sizeof(Atom));
 | 
			
		||||
    dev->button = butc;
 | 
			
		||||
    return TRUE;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue