Comment 7 for bug 1471598

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Thanks for this information Chris. I've ran this while watching the debug output for unity8 and turns out the above you registers a device with the evdev property ID_INPUT_TOUCHPAD. A touchpad is considered a "desktoppy" thing too, hence switches to windowed mode too.

I have modified your example to this (dropping the BTN_TOOL_FINGER):

mydev = UInput(events={e.EV_ABS: [(e.ABS_X, (0, 0, 0, 0)), (e.ABS_Y, (0, 0, 0, 0))]}, name='autopilot-finger', version=0x2, devnode='/dev/uinput')

and it does not register the Touchpad any more, hence not switching to Windowed mode. Changing the line to this:

mydev = UInput(events={e.EV_ABS: [(e.ABS_X, (0, 0, 0, 0)), (e.ABS_Y, (0, 0, 0, 0))], e.EV_KEY: [e.BTN_TOUCH]}, name='autopilot-finger', version=0x2, devnode='/dev/uinput')

Makes it correctly register as a ID_INPUT_TOUCHSCREEN and does not make unity8 go into windowed mode.

So seems the proper fix is to use , instead of BTN_TOUCH instead of BTN_TOOL_FINGER in autopilot's Touch device.