Merge lp:~canonical-platform-qa/autopilot/overlay_fix-touch-device into lp:autopilot/overlay

Proposed by Christopher Lee
Status: Merged
Approved by: Christopher Lee
Approved revision: 560
Merged at revision: 557
Proposed branch: lp:~canonical-platform-qa/autopilot/overlay_fix-touch-device
Merge into: lp:autopilot/overlay
Diff against target: 143 lines (+50/-17)
3 files modified
autopilot/input/_uinput.py (+3/-10)
autopilot/tests/unit/test_input.py (+2/-2)
debian/changelog (+45/-5)
To merge this branch: bzr merge lp:~canonical-platform-qa/autopilot/overlay_fix-touch-device
Reviewer Review Type Date Requested Status
Canonical Platform QA Team Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+264092@code.launchpad.net

This proposal supersedes a proposal from 2015-07-08.

Commit message

Create correct touch device at creation to stop unity8 erroneously changing to windowed mode. (Fixes lp:1471598).

Description of the change

Create correct touch device at creation to stop unity8 erroneously changing to windowed mode. (Fixes lp:1471598).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'autopilot/input/_uinput.py'
--- autopilot/input/_uinput.py 2015-03-16 15:14:27 +0000
+++ autopilot/input/_uinput.py 2015-07-08 01:17:08 +0000
@@ -23,7 +23,6 @@
2323
24from evdev import UInput, ecodes as e24from evdev import UInput, ecodes as e
2525
26import autopilot.platform
27from autopilot.input import Keyboard as KeyboardBase26from autopilot.input import Keyboard as KeyboardBase
28from autopilot.input import Touch as TouchBase27from autopilot.input import Touch as TouchBase
29from autopilot.input._common import get_center_point28from autopilot.input._common import get_center_point
@@ -325,13 +324,7 @@
325324
326325
327def _get_touch_tool():326def _get_touch_tool():
328 # android uses BTN_TOOL_FINGER, whereas desktop uses BTN_TOUCH. I have327 return e.BTN_TOUCH
329 # no idea why...
330 if autopilot.platform.model() == 'Desktop':
331 touch_tool = e.BTN_TOUCH
332 else:
333 touch_tool = e.BTN_TOOL_FINGER
334 return touch_tool
335328
336329
337class _UInputTouchDevice(object):330class _UInputTouchDevice(object):
@@ -378,7 +371,7 @@
378 self._device.write(371 self._device.write(
379 e.EV_ABS, e.ABS_MT_TRACKING_ID, self._get_next_tracking_id())372 e.EV_ABS, e.ABS_MT_TRACKING_ID, self._get_next_tracking_id())
380 press_value = 1373 press_value = 1
381 self._device.write(e.EV_KEY, e.BTN_TOOL_FINGER, press_value)374 self._device.write(e.EV_KEY, _get_touch_tool(), press_value)
382 self._device.write(e.EV_ABS, e.ABS_MT_POSITION_X, int(x))375 self._device.write(e.EV_ABS, e.ABS_MT_POSITION_X, int(x))
383 self._device.write(e.EV_ABS, e.ABS_MT_POSITION_Y, int(y))376 self._device.write(e.EV_ABS, e.ABS_MT_POSITION_Y, int(y))
384 self._device.write(e.EV_ABS, e.ABS_MT_PRESSURE, 400)377 self._device.write(e.EV_ABS, e.ABS_MT_PRESSURE, 400)
@@ -430,7 +423,7 @@
430 lift_tracking_id = -1423 lift_tracking_id = -1
431 self._device.write(e.EV_ABS, e.ABS_MT_TRACKING_ID, lift_tracking_id)424 self._device.write(e.EV_ABS, e.ABS_MT_TRACKING_ID, lift_tracking_id)
432 release_value = 0425 release_value = 0
433 self._device.write(e.EV_KEY, e.BTN_TOOL_FINGER, release_value)426 self._device.write(e.EV_KEY, _get_touch_tool(), release_value)
434 self._device.syn()427 self._device.syn()
435 self._release_touch_finger()428 self._release_touch_finger()
436429
437430
=== modified file 'autopilot/tests/unit/test_input.py'
--- autopilot/tests/unit/test_input.py 2015-03-22 06:20:40 +0000
+++ autopilot/tests/unit/test_input.py 2015-07-08 01:17:08 +0000
@@ -468,7 +468,7 @@
468 call.write(468 call.write(
469 ecodes.EV_ABS, ecodes.ABS_MT_TRACKING_ID, tracking_id),469 ecodes.EV_ABS, ecodes.ABS_MT_TRACKING_ID, tracking_id),
470 call.write(470 call.write(
471 ecodes.EV_KEY, ecodes.BTN_TOOL_FINGER, press_value),471 ecodes.EV_KEY, ecodes.BTN_TOUCH, press_value),
472 call.write(ecodes.EV_ABS, ecodes.ABS_MT_POSITION_X, x),472 call.write(ecodes.EV_ABS, ecodes.ABS_MT_POSITION_X, x),
473 call.write(ecodes.EV_ABS, ecodes.ABS_MT_POSITION_Y, y),473 call.write(ecodes.EV_ABS, ecodes.ABS_MT_POSITION_Y, y),
474 call.write(ecodes.EV_ABS, ecodes.ABS_MT_PRESSURE, 400),474 call.write(ecodes.EV_ABS, ecodes.ABS_MT_PRESSURE, 400),
@@ -493,7 +493,7 @@
493 call.write(493 call.write(
494 ecodes.EV_ABS, ecodes.ABS_MT_TRACKING_ID, lift_tracking_id),494 ecodes.EV_ABS, ecodes.ABS_MT_TRACKING_ID, lift_tracking_id),
495 call.write(495 call.write(
496 ecodes.EV_KEY, ecodes.BTN_TOOL_FINGER, release_value),496 ecodes.EV_KEY, ecodes.BTN_TOUCH, release_value),
497 call.syn()497 call.syn()
498 ]498 ]
499 self.assertEqual(expected_calls, touch._device.mock_calls)499 self.assertEqual(expected_calls, touch._device.mock_calls)
500500
=== modified file 'debian/changelog'
--- debian/changelog 2015-05-08 04:45:01 +0000
+++ debian/changelog 2015-07-08 01:17:08 +0000
@@ -1,12 +1,52 @@
1autopilot (1.5.0) UNRELEASED; urgency=medium1autopilot (1.5.1+15.04.20150522-0ubuntu1) vivid; urgency=medium
22
3 [ CI Train Bot ]
4 * New rebuild forced.
5
6 [ Christopher Lee, Federico Gimenez, Leo Arias, Richard Huddie, Vincent Ladeuil ]
7 * Bug fixes for logging (debug level now -vv) and application of CPO
8 bases for proxy objects. (LP: #1425721, #1376996, #1420949)
9
10 -- CI Train Bot <ci-train-bot@canonical.com> Fri, 22 May 2015 16:54:03 +0000
11
12autopilot (1.5.0+15.04.20150408-0ubuntu1) vivid; urgency=medium
13
14 [ Albert Astals Cid ]
15 * Bug fixes related to improving automated runs.
16
17 [ Christopher Lee ]
18 * Bug fixes related to improving automated runs.
19
20 -- CI Train Bot <ci-train-bot@canonical.com> Wed, 08 Apr 2015 15:07:28 +0000
21
22autopilot (1.5.0+15.04.20150323-0ubuntu1) vivid; urgency=medium
23
24 [ CI Train Bot ]
25 * New rebuild forced.
26
27 [ Christopher Lee ]
28 * Bugfix for Touch pointer pressed. Packaging req. due to python3-xlib
29 bug.
30
31 [ Leo Arias ]
32 * Bugfix for Touch pointer pressed. Packaging req. due to python3-xlib
33 bug.
34
35 -- CI Train Bot <ci-train-bot@canonical.com> Mon, 23 Mar 2015 09:34:31 +0000
36
37autopilot (1.5.0+15.04.20150226.1-0ubuntu1) vivid; urgency=medium
38
39 [ Christopher Lee ]
3 * Fix for desktop file name change (lp:1411096)40 * Fix for desktop file name change (lp:1411096)
4 Fix for config value containing '=' char (lp:1408317)41 Fix for config value containing '=' char (lp:1408317)
5 Fix for skipped tests not appearing in log (lp:1414632)42 Fix for skipped tests not appearing in log (lp:1414632)
6 Add json docs build (for web publish) (lp:1409778)43 Add json docs build (for web publish) (lp:1409778)
7 Documentation improvements for API, Tutorial, FAQ, and Guidelines44 Documentation improvements for API, Tutorial, FAQ, and Guidelines
845
9 -- Christopher Lee <chris.lee@canonical.com> Fri, 27 Feb 2015 10:16:42 +130046 [ CI Train Bot ]
47 * New rebuild forced.
48
49 -- CI Train Bot <ci-train-bot@canonical.com> Thu, 26 Feb 2015 22:47:35 +0000
1050
11autopilot (1.5.0+15.04.20141031-0ubuntu1) vivid; urgency=low51autopilot (1.5.0+15.04.20141031-0ubuntu1) vivid; urgency=low
1252
@@ -131,7 +171,7 @@
131 * Remove python2 packages and dependencies, as they're now handled by the171 * Remove python2 packages and dependencies, as they're now handled by the
132 autopilot-legacy source package. (lp: #1308661)172 autopilot-legacy source package. (lp: #1308661)
133 * Autopilot vis tool can now search the introspection tree. (lp: #1097392)173 * Autopilot vis tool can now search the introspection tree. (lp: #1097392)
134 * Autopilot vis tool can now draw a transparent overlay over the selected 174 * Autopilot vis tool can now draw a transparent overlay over the selected
135 widget.175 widget.
136 * Autopilot vis tool now shows the root of the introspection tree (lp: #1298600)176 * Autopilot vis tool now shows the root of the introspection tree (lp: #1298600)
137 * Autopilot vis tool can now be launched from the unity dash.177 * Autopilot vis tool can now be launched from the unity dash.
@@ -265,7 +305,7 @@
265305
266autopilot (1.4+14.04.20140310.1-0ubuntu1) trusty; urgency=low306autopilot (1.4+14.04.20140310.1-0ubuntu1) trusty; urgency=low
267307
268 * 308 *
269309
270 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 10 Mar 2014 19:39:00 +0000310 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 10 Mar 2014 19:39:00 +0000
271311

Subscribers

People subscribed via source and target branches

to all changes: