Xi: split ProcessOtherEvent into ProcessDeviceEvent
No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
		
							parent
							
								
									190a6f45ee
								
							
						
					
					
						commit
						0b9d2e426d
					
				| 
						 | 
					@ -902,13 +902,12 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
 | 
				
			||||||
    return DEFAULT;
 | 
					    return DEFAULT;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Main device event processing function.
 | 
					 * Process DeviceEvents and DeviceChangedEvents.
 | 
				
			||||||
 * Called from when processing the events from the event queue.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void
 | 
					static void
 | 
				
			||||||
ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
 | 
					ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    GrabPtr grab;
 | 
					    GrabPtr grab;
 | 
				
			||||||
    Bool deactivateDeviceGrab = FALSE;
 | 
					    Bool deactivateDeviceGrab = FALSE;
 | 
				
			||||||
| 
						 | 
					@ -919,18 +918,6 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
 | 
				
			||||||
    DeviceIntPtr mouse = NULL, kbd = NULL;
 | 
					    DeviceIntPtr mouse = NULL, kbd = NULL;
 | 
				
			||||||
    DeviceEvent *event = &ev->device_event;
 | 
					    DeviceEvent *event = &ev->device_event;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    verify_internal_event(ev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (ev->any.type == ET_RawKeyPress ||
 | 
					 | 
				
			||||||
        ev->any.type == ET_RawKeyRelease ||
 | 
					 | 
				
			||||||
        ev->any.type == ET_RawButtonPress ||
 | 
					 | 
				
			||||||
        ev->any.type == ET_RawButtonRelease ||
 | 
					 | 
				
			||||||
        ev->any.type == ET_RawMotion)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        DeliverRawEvent(&ev->raw_event, device);
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (IsPointerDevice(device))
 | 
					    if (IsPointerDevice(device))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        kbd = GetMaster(device, KEYBOARD_OR_FLOAT);
 | 
					        kbd = GetMaster(device, KEYBOARD_OR_FLOAT);
 | 
				
			||||||
| 
						 | 
					@ -1042,6 +1029,31 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
 | 
				
			||||||
    event->detail.key = key;
 | 
					    event->detail.key = key;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Main device event processing function.
 | 
				
			||||||
 | 
					 * Called from when processing the events from the event queue.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    verify_internal_event(ev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    switch(ev->any.type)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        case  ET_RawKeyPress:
 | 
				
			||||||
 | 
					        case  ET_RawKeyRelease:
 | 
				
			||||||
 | 
					        case  ET_RawButtonPress:
 | 
				
			||||||
 | 
					        case  ET_RawButtonRelease:
 | 
				
			||||||
 | 
					        case  ET_RawMotion:
 | 
				
			||||||
 | 
					            DeliverRawEvent(&ev->raw_event, device);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					            ProcessDeviceEvent(ev, device);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
InitProximityClassDeviceStruct(DeviceIntPtr dev)
 | 
					InitProximityClassDeviceStruct(DeviceIntPtr dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue