Digging into this its not 'Mouse' events triggering this (you cannot create a
Mouse instance on a device without installing all the XLib stuff).
It's the creation of a Touch device that is triggering this. You can observe
this by shelling into a device and starting python3 terminal:
>>> from autopilot.input import Touch
>>> mytouch = Touch.create()
>>> mytouch.close()
(When you close the python terminal unity will revert back to its normal
state.)
Looking at what happens in touch creation this is the *paraphrased* code
that triggers the change to windowed:
>>> from evdev import UInput, ecodes as e
>>> 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_TOOL_FINGER]}, name='autopilot-finger',
version=0x2, devnode='/dev/uinput')
>>> mydev.close() # Unity8 will become un-windowed at this point.
The actual code where its created lives here[1] the interesting events
part here[2] and there are more events passed in but this is enough to
trigger the windowing in unity8.
My thoughts are that either autopilot is creating the touch device
incorrectly or that the detection of a mouse device in unity8 is picking
this up inadvertently.
I'm currently seeking clarification re: the touch device creation (note
this comment in the source[3]).
[1]
http://bazaar.launchpad.net/~autopilot/autopilot/trunk/view/head:/autopilot/input/_uinput.py#L353
[2]
http://bazaar.launchpad.net/~autopilot/autopilot/trunk/view/head:/autopilot/input/_uinput.py#L282
[3]
http://bazaar.launchpad.net/~autopilot/autopilot/trunk/view/head:/autopilot/input/_uinput.py#L328
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1471598
Title:
Autopilot uses mouse events, puts device in windowed mode
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopilot/+bug/1471598/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs