touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #88071
[Bug 1471598] Re: Autopilot uses mouse events, puts device in windowed mode
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
Touch seeded packages, which is subscribed to autopilot in Ubuntu.
https://bugs.launchpad.net/bugs/1471598
Title:
Autopilot uses mouse events, puts device in windowed mode
Status in autopilot package in Ubuntu:
Confirmed
Status in unity8 package in Ubuntu:
Confirmed
Bug description:
AP tests emulating mouse to run, which puts the device into windowed mode.
mouse presence is used to toggle the windowed mode on mobile devices.
----orig bug ----
The autopilot tests on Krillin run in windowed mode. I don't think this should ever happen on that form factor.
See also a bunch of dubious errors below.
Tests running...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<mir::socket_disconnected_error> >'
what(): Failed to send message to server: Broken pipe
Failed to connect to server. Error was :Failed to connect to server socket: Connection refused
(process:5172): GLib-GIO-CRITICAL **: Error while sending AddMatch() message: The connection is closed
g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
/bin/bash: line 1: 5172 Terminated SUPPRESS_DEPRECATED_NOTE=yes autopilot3 run ubuntuuitoolkit
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopilot/+bug/1471598/+subscriptions
References