Merge lp:~dandrader/unity8/mirSurfaceInputBounds into lp:unity8

Proposed by Daniel d'Andrada on 2016-06-30
Status: Merged
Approved by: Michael Zanetti on 2016-07-06
Approved revision: 2527
Merged at revision: 2543
Proposed branch: lp:~dandrader/unity8/mirSurfaceInputBounds
Merge into: lp:unity8
Diff against target: 563 lines (+86/-186) (has conflicts)
17 files modified
CMakeLists.txt (+1/-1)
debian/changelog (+9/-0)
debian/control (+4/-3)
qml/Components/InputMethod.qml (+8/-44)
qml/Shell.qml (+1/-1)
qml/Stages/DesktopStage.qml (+5/-1)
tests/mocks/Unity/Application/CMakeLists.txt (+0/-1)
tests/mocks/Unity/Application/MirSurface.cpp (+21/-0)
tests/mocks/Unity/Application/MirSurface.h (+8/-0)
tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp (+0/-58)
tests/mocks/Unity/Application/UbuntuKeyboardInfo.h (+0/-57)
tests/mocks/Unity/Application/VirtualKeyboard.cpp (+20/-1)
tests/mocks/Unity/Application/VirtualKeyboard.h (+4/-1)
tests/mocks/Unity/Application/plugin.cpp (+0/-8)
tests/mocks/Unity/Application/resources/VirtualKeyboard.qml (+1/-6)
tests/qmltests/Stages/tst_DesktopStage.qml (+3/-3)
tests/qmltests/Tutorial/tst_Tutorial.qml (+1/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~dandrader/unity8/mirSurfaceInputBounds
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) 2016-06-30 Needs Fixing on 2016-07-18
Michał Sawicz packaging Approve on 2016-07-12
Unity8 CI Bot continuous-integration 2016-06-30 Needs Fixing on 2016-07-06
Michael Zanetti (community) 2016-06-30 Approve on 2016-07-06
Review via email: mp+298780@code.launchpad.net

This proposal supersedes a proposal from 2016-06-29.

Commit Message

Make use of MirSurface::inputBounds and drop UbuntuKeyboardInfo hack

Description of the Change

All packages are in this silo: https://requests.ci-train.ubuntu.com/#/ticket/1525

* Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~dandrader/qtubuntu/exposeMirSurface/+merge/296983
https://code.launchpad.net/~dandrader/unity-api/mirSurfaceInputBounds/+merge/296985
https://code.launchpad.net/~dandrader/qtmir/mirSurfaceInputBounds/+merge/296986
https://code.launchpad.net/~dandrader/ubuntu-keyboard/mirSurfaceInputBounds/+merge/296987

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Not applicable

* If you changed the UI, has there been a design review?
Not applicable

To post a comment you must log in.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2441
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1457/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1937/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1963
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1898
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1898
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1898
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1889/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1889/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1457/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Text conflict in debian/control
1 conflicts encountered.

Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

On 20/06/2016 04:24, Albert Astals Cid wrote:
> Text conflict in debian/control
> 1 conflicts encountered.
>
Fixed.

Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2491
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1566/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2080/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2108
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2019
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2019
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2019
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2010/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2010/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1566/rebuild

review: Needs Fixing (continuous-integration)
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Works for me.

review: Approve
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Contents conflict in tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp
1 conflicts encountered.

Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2526
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1640/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2182/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2210
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2117
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2117
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2117
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2108/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2108/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1640/rebuild

review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2527
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1647/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2189/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2217
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2123
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2123
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2123
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2114/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2114/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1647/rebuild

review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2531
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1648/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2190/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2218
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2124
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2124
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2124
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2115/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2115/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1648/rebuild

review: Needs Fixing (continuous-integration)
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

This moves all windows up when the OSK is shown. Should only move the focused one instead

review: Needs Fixing
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

Maximizing windows is broken

review: Needs Fixing
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

not sure if it's a good idea to change that away from appContainer. The appContainer might be moved around depending on other factors (launcher shown etc). Apart from the previously mentioned breakage in maximizing, this is probably gonna make things harder if we need to consider the appContainer *and* the visibleRect in the future... I would probably prefer that you don't refactor this stuff too much. Not only because this is conflicting already a lot with the unified staged stuff...

Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2526
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1654/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2194/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2222
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2128
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2128
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2128
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2119/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2119/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1654/rebuild

review: Needs Fixing (continuous-integration)
Michael Zanetti (mzanetti) wrote :

Code looks ok. Thanks for reverting the refactor. As discussed on IRC, lets see how to get that in when the stages are merged. The issues with the window displacement are fixed now too.

However, for some reason this seems to break the OSK for apps when it is on the external screen (Tested with frieza plugged to a external HDMI screen). Text fields can't get focused any more. Could well be that it's not this branch, but instead another one from the silo. Can you please verify that?

review: Needs Information
Daniel d'Andrada (dandrader) wrote :

On 04/07/2016 13:40, Michael Zanetti wrote:
> However, for some reason this seems to break the OSK for apps when it is on the external screen (Tested with frieza plugged to a external HDMI screen). Text fields can't get focused any more. Could well be that it's not this branch, but instead another one from the silo. Can you please verify that?

Reproduced with mako.

Daniel d'Andrada (dandrader) wrote :

> Code looks ok. Thanks for reverting the refactor. As discussed on IRC, lets
> see how to get that in when the stages are merged. The issues with the window
> displacement are fixed now too.
>
>
> However, for some reason this seems to break the OSK for apps when it is on
> the external screen (Tested with frieza plugged to a external HDMI screen).
> Text fields can't get focused any more. Could well be that it's not this
> branch, but instead another one from the silo. Can you please verify that?

Turns out to be a mir bug (https://bugs.launchpad.net/mir/+bug/1598936). Added a workaround for it in the qtmir branch (http://bazaar.launchpad.net/~dandrader/qtmir/mirSurfaceInputBounds/revision/522).

Works fine now.

Michał Sawicz (saviq) wrote :

Text conflict in qml/Stages/DesktopStage.qml
1 conflicts encountered.

review: Needs Fixing
2527. By Daniel d'Andrada on 2016-07-06

Merge trunk

[ Michael Zanetti ]
don't displace windows if the OSK is on another screen (LP:
#1598917)

Daniel d'Andrada (dandrader) wrote :

On 06/07/2016 09:30, Michał Sawicz wrote:
> Review: Needs Fixing
>
> Text conflict in qml/Stages/DesktopStage.qml
> 1 conflicts encountered.

Fixed

Michael Zanetti (mzanetti) wrote :

ack, now looks and tests fine.

review: Approve
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2527
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1678/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2225/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2253
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2159
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2159
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2159
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2150/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2150/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1678/rebuild

review: Needs Fixing (continuous-integration)
2528. By Daniel d'Andrada on 2016-07-07

tst_Tutorial: Update test_oskDoesNotHideTutorial

2529. By Daniel d'Andrada on 2016-07-12

This new unity8 is not compatible with current/old ubuntu-keyboard

2530. By Daniel d'Andrada on 2016-07-12

Bump version

Michał Sawicz (saviq) :
review: Approve (packaging)
Lukáš Tinkl (lukas-kde) wrote :

Text conflict in debian/changelog

review: Needs Fixing
Daniel d'Andrada (dandrader) wrote :

> Text conflict in debian/changelog

I don't see any.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-06-27 18:41:15 +0000
3+++ CMakeLists.txt 2016-07-12 11:51:50 +0000
4@@ -57,7 +57,7 @@
5 find_package(Qt5Concurrent 5.4 REQUIRED)
6 find_package(Qt5Sql 5.4 REQUIRED)
7
8-pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18)
9+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=19)
10 pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
11 pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
12 pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2016-07-07 16:49:32 +0000
16+++ debian/changelog 2016-07-12 11:51:50 +0000
17@@ -1,3 +1,4 @@
18+<<<<<<< TREE
19 unity8 (8.12+16.10.20160707-0ubuntu1) yakkety; urgency=medium
20
21 [ Michael Zanetti ]
22@@ -6,6 +7,14 @@
23
24 -- Michał Sawicz <michal.sawicz@canonical.com> Thu, 07 Jul 2016 16:49:32 +0000
25
26+=======
27+unity8 (8.13) UNRELEASED; urgency=medium
28+
29+ * Make use of MirSurface::inputBounds and drop UbuntuKeyboardInfo hack
30+
31+ -- Daniel d'Andrada <daniel.dandrada@canonical.com> Tue, 12 Jul 2016 08:49:26 -0300
32+
33+>>>>>>> MERGE-SOURCE
34 unity8 (8.12+16.10.20160705-0ubuntu1) yakkety; urgency=medium
35
36 [ Michael Zanetti ]
37
38=== modified file 'debian/control'
39--- debian/control 2016-06-27 18:44:35 +0000
40+++ debian/control 2016-07-12 11:51:50 +0000
41@@ -33,7 +33,7 @@
42 libubuntugestures5-dev,
43 libubuntugestures5-private-dev,
44 libudev-dev,
45- libunity-api-dev (>= 7.115),
46+ libunity-api-dev (>= 7.116),
47 libusermetricsoutput1-dev,
48 # Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
49 libx11-dev[!armhf],
50@@ -124,6 +124,7 @@
51 Breaks: indicator-network (<< 0.5.1+14.10.20141014),
52 ubuntu-touch-session (<< 0.107),
53 unity8-greeter (<< 7.89),
54+ ubuntu-keyboard (<< 0.100),
55 Replaces: ubuntu-touch-session (<< 0.82~),
56 unity8-greeter (<< 7.89),
57 Conflicts: ubuntu-system-settings-wizard,
58@@ -138,7 +139,7 @@
59 qtdeclarative5-ubuntu-settings-components (>= 0.7),
60 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
61 ubuntu-thumbnailer-impl-0,
62- unity-application-impl-17,
63+ unity-application-impl-19,
64 unity-notifications-impl-3,
65 unity-plugin-scopes | unity-scopes-impl,
66 unity-scopes-impl-12,
67@@ -184,7 +185,7 @@
68 Depends: ${misc:Depends},
69 ${shlibs:Depends},
70 Provides: unity-application-impl,
71- unity-application-impl-16,
72+ unity-application-impl-19,
73 Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)
74 Description: Fake environment for running Unity 8 shell
75 Provides fake implementations of some QML modules used by Unity 8 shell
76
77=== modified file 'qml/Components/InputMethod.qml'
78--- qml/Components/InputMethod.qml 2016-05-05 17:20:10 +0000
79+++ qml/Components/InputMethod.qml 2016-07-12 11:51:50 +0000
80@@ -1,5 +1,5 @@
81 /*
82- * Copyright (C) 2014,2015 Canonical, Ltd.
83+ * Copyright (C) 2014-2016 Canonical, Ltd.
84 *
85 * This program is free software; you can redistribute it and/or modify
86 * it under the terms of the GNU General Public License as published by
87@@ -16,13 +16,12 @@
88
89 import QtQuick 2.4
90 import Unity.Application 0.1
91-import Ubuntu.Components 1.3
92 import Ubuntu.Gestures 0.1
93
94 Item {
95 id: root
96
97- property int transitionDuration: UbuntuAnimation.FastDuration
98+ readonly property rect visibleRect: surfaceItem.surface ? surfaceItem.surface.inputBounds : Qt.rect(0, 0, 0, 0)
99
100 MirSurfaceItem {
101 id: surfaceItem
102@@ -42,51 +41,16 @@
103 }
104
105 TouchGate {
106- x: UbuntuKeyboardInfo.x
107- y: UbuntuKeyboardInfo.y
108- width: UbuntuKeyboardInfo.width
109- height: UbuntuKeyboardInfo.height
110+ x: root.visibleRect.x
111+ y: root.visibleRect.y
112+ width: root.visibleRect.width
113+ height: root.visibleRect.height
114
115 targetItem: surfaceItem
116 }
117
118- state: {
119- if (surfaceItem.surface &&
120+ visible: surfaceItem.surface &&
121 surfaceItem.surfaceState != Mir.HiddenState &&
122 surfaceItem.surfaceState != Mir.MinimizedState &&
123- root.enabled) {
124- return "shown";
125- } else {
126- return "hidden";
127- }
128- }
129-
130- states: [
131- State {
132- name: "shown"
133- PropertyChanges {
134- target: root
135- visible: true
136- y: 0
137- }
138- },
139- State {
140- name: "hidden"
141- PropertyChanges {
142- target: root
143- visible: false
144- // half-way down because the vkb occupies only the lower half of the surface
145- // TODO: consider keyboard rotation
146- y: root.parent.height / 2.0
147- }
148- }
149- ]
150-
151- transitions: [
152- Transition {
153- from: "*"; to: "*"
154- PropertyAction { property: "visible"; value: true }
155- UbuntuNumberAnimation { property: "y"; duration: transitionDuration }
156- }
157- ]
158+ root.enabled
159 }
160
161=== modified file 'qml/Shell.qml'
162--- qml/Shell.qml 2016-07-05 09:57:08 +0000
163+++ qml/Shell.qml 2016-07-12 11:51:50 +0000
164@@ -657,7 +657,7 @@
165 paused: callManager.hasCalls || !greeter || greeter.shown ||
166 wizard.active
167 delayed: dialogs.hasActiveDialog || notifications.hasNotification ||
168- inputMethod.state === "shown" ||
169+ inputMethod.visible ||
170 (launcher.shown && !launcher.lockedVisible) ||
171 panel.indicators.shown || stage.dragProgress > 0
172 usageScenario: shell.usageScenario
173
174=== modified file 'qml/Stages/DesktopStage.qml'
175--- qml/Stages/DesktopStage.qml 2016-07-05 09:57:08 +0000
176+++ qml/Stages/DesktopStage.qml 2016-07-12 11:51:50 +0000
177@@ -156,6 +156,10 @@
178 }
179 }
180 }
181+
182+ readonly property real virtualKeyboardHeight: SurfaceManager.inputMethodSurface
183+ ? SurfaceManager.inputMethodSurface.inputBounds.height
184+ : 0
185 }
186
187 Connections {
188@@ -273,7 +277,7 @@
189 property: "y"
190 value: appDelegate.requestedY -
191 Math.min(appDelegate.requestedY - PanelState.panelHeight,
192- Math.max(0, UbuntuKeyboardInfo.height - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
193+ Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
194 when: root.oskEnabled && appDelegate.focus && appDelegate.state == "normal"
195 && SurfaceManager.inputMethodSurface
196 && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
197
198=== modified file 'tests/mocks/Unity/Application/CMakeLists.txt'
199--- tests/mocks/Unity/Application/CMakeLists.txt 2016-04-04 13:37:49 +0000
200+++ tests/mocks/Unity/Application/CMakeLists.txt 2016-07-12 11:51:50 +0000
201@@ -7,7 +7,6 @@
202 MirSurfaceListModel.cpp
203 ObjectListModel.h
204 SurfaceManager.cpp
205- UbuntuKeyboardInfo.cpp
206 VirtualKeyboard.cpp
207 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
208 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/ApplicationManagerInterface.h
209
210=== modified file 'tests/mocks/Unity/Application/MirSurface.cpp'
211--- tests/mocks/Unity/Application/MirSurface.cpp 2016-05-17 19:59:44 +0000
212+++ tests/mocks/Unity/Application/MirSurface.cpp 2016-07-12 11:51:50 +0000
213@@ -87,6 +87,8 @@
214 m_zombieTimer.setInterval(100);
215 m_zombieTimer.setSingleShot(true);
216 connect(&m_zombieTimer, &QTimer::timeout, this, [this](){ this->setLive(false); });
217+
218+ updateInputBoundsAfterResize();
219 }
220
221 MirSurface::~MirSurface()
222@@ -326,6 +328,13 @@
223 if (changed) {
224 Q_EMIT sizeChanged(QSize(width, height));
225 }
226+
227+ updateInputBoundsAfterResize();
228+}
229+
230+void MirSurface::updateInputBoundsAfterResize()
231+{
232+ setInputBounds(QRect(0, 0, m_width, m_height));
233 }
234
235 bool MirSurface::isSlowToResize() const
236@@ -439,6 +448,18 @@
237 return controller ? controller->focusedSurface() == this : false;
238 }
239
240+QRect MirSurface::inputBounds() const
241+{
242+ return m_inputBounds;
243+}
244+
245+void MirSurface::setInputBounds(const QRect &boundsRect)
246+{
247+ if (boundsRect != m_inputBounds) {
248+ m_inputBounds = boundsRect;
249+ Q_EMIT inputBoundsChanged(m_inputBounds);
250+ }
251+}
252 #if MIRSURFACE_DEBUG
253 #undef DEBUG_MSG
254 #define DEBUG_MSG(params) qDebug().nospace() << "MirFocusController::" << __func__ << " " << params
255
256=== modified file 'tests/mocks/Unity/Application/MirSurface.h'
257--- tests/mocks/Unity/Application/MirSurface.h 2016-05-27 13:52:52 +0000
258+++ tests/mocks/Unity/Application/MirSurface.h 2016-07-12 11:51:50 +0000
259@@ -102,6 +102,7 @@
260 Mir::ShellChrome shellChrome() const override;
261
262 bool focused() const override;
263+ QRect inputBounds() const override;
264
265 Q_INVOKABLE void requestFocus() override;
266
267@@ -128,6 +129,8 @@
268 Q_INVOKABLE void setWidthIncrement(int);
269 Q_INVOKABLE void setHeightIncrement(int);
270
271+ Q_INVOKABLE virtual void setInputBounds(const QRect &boundsRect);
272+
273 /////
274 // internal mock stuff
275
276@@ -160,6 +163,9 @@
277 void raiseRequested();
278 void closeRequested();
279
280+protected:
281+ virtual void updateInputBoundsAfterResize();
282+
283 private Q_SLOTS:
284 void applyDelayedResize();
285
286@@ -202,6 +208,8 @@
287 QHash<qintptr, View> m_views;
288
289 QTimer m_zombieTimer;
290+
291+ QRect m_inputBounds;
292 };
293
294 #endif // MOCK_MIR_SURFACE_H
295
296=== removed file 'tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp'
297--- tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp 2016-06-23 10:31:11 +0000
298+++ tests/mocks/Unity/Application/UbuntuKeyboardInfo.cpp 1970-01-01 00:00:00 +0000
299@@ -1,58 +0,0 @@
300-/*
301- * Copyright (C) 2014-2015 Canonical, Ltd.
302- *
303- * This program is free software: you can redistribute it and/or modify it under
304- * the terms of the GNU Lesser General Public License version 3, as published by
305- * the Free Software Foundation.
306- *
307- * This program is distributed in the hope that it will be useful, but WITHOUT
308- * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
309- * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
310- * Lesser General Public License for more details.
311- *
312- * You should have received a copy of the GNU Lesser General Public License
313- * along with this program. If not, see <http://www.gnu.org/licenses/>.
314- */
315-
316-#include "UbuntuKeyboardInfo.h"
317-
318-UbuntuKeyboardInfo::UbuntuKeyboardInfo(QObject *parent)
319- : QObject(parent),
320- m_x(0),
321- m_y(0),
322- m_width(200),
323- m_height(0)
324-{
325-}
326-
327-void UbuntuKeyboardInfo::setX(qreal value)
328-{
329- if (value != m_x) {
330- m_x = value;
331- Q_EMIT xChanged(m_x);
332- }
333-}
334-
335-void UbuntuKeyboardInfo::setY(qreal value)
336-{
337- if (value != m_y) {
338- m_y = value;
339- Q_EMIT yChanged(m_y);
340- }
341-}
342-
343-void UbuntuKeyboardInfo::setWidth(qreal value)
344-{
345- if (value != m_width) {
346- m_width = value;
347- Q_EMIT widthChanged(m_width);
348- }
349-}
350-
351-void UbuntuKeyboardInfo::setHeight(qreal value)
352-{
353- if (value != m_height) {
354- m_height = value;
355- Q_EMIT heightChanged(m_height);
356- }
357-}
358
359=== removed file 'tests/mocks/Unity/Application/UbuntuKeyboardInfo.h'
360--- tests/mocks/Unity/Application/UbuntuKeyboardInfo.h 2016-04-14 11:46:04 +0000
361+++ tests/mocks/Unity/Application/UbuntuKeyboardInfo.h 1970-01-01 00:00:00 +0000
362@@ -1,57 +0,0 @@
363-/*
364- * Copyright (C) 2014-2015 Canonical, Ltd.
365- *
366- * This program is free software: you can redistribute it and/or modify it under
367- * the terms of the GNU Lesser General Public License version 3, as published by
368- * the Free Software Foundation.
369- *
370- * This program is distributed in the hope that it will be useful, but WITHOUT
371- * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
372- * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
373- * Lesser General Public License for more details.
374- *
375- * You should have received a copy of the GNU Lesser General Public License
376- * along with this program. If not, see <http://www.gnu.org/licenses/>.
377- */
378-
379-#ifndef UBUNTU_KEYBOARD_INFO_H
380-#define UBUNTU_KEYBOARD_INFO_H
381-
382-#include <QLocalSocket>
383-#include <QTimer>
384-
385-class UbuntuKeyboardInfo : public QObject {
386- Q_OBJECT
387- Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
388- Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
389- Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged)
390- Q_PROPERTY(qreal height READ height WRITE setHeight NOTIFY heightChanged)
391-public:
392- UbuntuKeyboardInfo(QObject *parent = 0);
393- virtual ~UbuntuKeyboardInfo() {}
394- qreal x() const { return m_x; }
395- qreal y() const { return m_y; }
396- qreal width() const { return m_width; }
397- qreal height() const { return m_height; }
398-
399- // Just in the fake implementation
400- void setX(qreal value);
401- void setY(qreal value);
402- void setWidth(qreal value);
403- void setHeight(qreal value);
404-
405-Q_SIGNALS:
406- void xChanged(qreal x);
407- void yChanged(qreal y);
408- void widthChanged(qreal width);
409- void heightChanged(qreal height);
410-
411-private:
412- QLocalSocket m_socket;
413- qint32 m_x;
414- qint32 m_y;
415- qint32 m_width;
416- qint32 m_height;
417-};
418-
419-#endif // UBUNTU_KEYBOARD_INFO_H
420
421=== modified file 'tests/mocks/Unity/Application/VirtualKeyboard.cpp'
422--- tests/mocks/Unity/Application/VirtualKeyboard.cpp 2016-04-13 18:33:15 +0000
423+++ tests/mocks/Unity/Application/VirtualKeyboard.cpp 2016-07-12 11:51:50 +0000
424@@ -1,5 +1,5 @@
425 /*
426- * Copyright (C) 2015 Canonical, Ltd.
427+ * Copyright (C) 2015,2016 Canonical, Ltd.
428 *
429 * This program is free software; you can redistribute it and/or modify
430 * it under the terms of the GNU General Public License as published by
431@@ -34,3 +34,22 @@
432 VirtualKeyboard::~VirtualKeyboard()
433 {
434 }
435+
436+void VirtualKeyboard::updateInputBoundsAfterResize()
437+{
438+ int width = this->width();
439+
440+ int height;
441+ if (this->width() > this->height()) {
442+ // landscape
443+ height = this->height() * 0.4;
444+ } else {
445+ // portrait
446+ height = this->width() * 0.6;
447+ }
448+
449+ int x = 0;
450+ int y = this->height() - height;
451+
452+ setInputBounds(QRect(x, y, width, height));
453+}
454
455=== modified file 'tests/mocks/Unity/Application/VirtualKeyboard.h'
456--- tests/mocks/Unity/Application/VirtualKeyboard.h 2016-04-13 18:33:15 +0000
457+++ tests/mocks/Unity/Application/VirtualKeyboard.h 2016-07-12 11:51:50 +0000
458@@ -1,5 +1,5 @@
459 /*
460- * Copyright (C) 2015 Canonical, Ltd.
461+ * Copyright (C) 2015,2016 Canonical, Ltd.
462 *
463 * This program is free software; you can redistribute it and/or modify
464 * it under the terms of the GNU General Public License as published by
465@@ -27,6 +27,9 @@
466 public:
467 explicit VirtualKeyboard();
468 ~VirtualKeyboard();
469+
470+protected:
471+ void updateInputBoundsAfterResize() override;
472 };
473
474 Q_DECLARE_METATYPE(VirtualKeyboard*)
475
476=== modified file 'tests/mocks/Unity/Application/plugin.cpp'
477--- tests/mocks/Unity/Application/plugin.cpp 2016-04-14 11:46:04 +0000
478+++ tests/mocks/Unity/Application/plugin.cpp 2016-07-12 11:51:50 +0000
479@@ -19,7 +19,6 @@
480 #include "ApplicationManager.h"
481 #include "MirSurfaceItem.h"
482 #include "SurfaceManager.h"
483-#include "UbuntuKeyboardInfo.h"
484
485 // unity-api
486 #include <unity/shell/application/Mir.h>
487@@ -53,12 +52,6 @@
488 return SurfaceManager::instance();
489 }
490
491-QObject* ubuntuKeyboardInfoSingleton(QQmlEngine*, QJSEngine*)
492-{
493- createUnityApplicationSharedSingletons();
494- return new UbuntuKeyboardInfo;
495-}
496-
497 QObject* mirFocusControllerSingleton(QQmlEngine*, QJSEngine*)
498 {
499 createUnityApplicationSharedSingletons();
500@@ -86,7 +79,6 @@
501
502 qmlRegisterSingletonType<ApplicationManager>(uri, 0, 1, "ApplicationManager", applicationManagerSingleton);
503 qmlRegisterSingletonType<SurfaceManager>(uri, 0, 1, "SurfaceManager", surfaceManagerSingleton);
504- qmlRegisterSingletonType<UbuntuKeyboardInfo>(uri, 0, 1, "UbuntuKeyboardInfo", ubuntuKeyboardInfoSingleton);
505
506 qmlRegisterUncreatableType<Mir>(uri, 0, 1, "Mir", "Mir provides enum values, it can't be instantiated");
507 }
508
509=== modified file 'tests/mocks/Unity/Application/resources/VirtualKeyboard.qml'
510--- tests/mocks/Unity/Application/resources/VirtualKeyboard.qml 2015-09-29 12:28:10 +0000
511+++ tests/mocks/Unity/Application/resources/VirtualKeyboard.qml 2016-07-12 11:51:50 +0000
512@@ -1,5 +1,5 @@
513 /*
514- * Copyright 2014-2015 Canonical Ltd.
515+ * Copyright 2014-2016 Canonical Ltd.
516 *
517 * This program is free software; you can redistribute it and/or modify
518 * it under the terms of the GNU Lesser General Public License as published by
519@@ -38,9 +38,4 @@
520 anchors.fill: parent
521 }
522 }
523-
524- Binding { target: UbuntuKeyboardInfo; property: "x"; value: screenshotImage.x}
525- Binding { target: UbuntuKeyboardInfo; property: "y"; value: screenshotImage.y}
526- Binding { target: UbuntuKeyboardInfo; property: "width"; value: screenshotImage.width}
527- Binding { target: UbuntuKeyboardInfo; property: "height"; value: screenshotImage.height}
528 }
529
530=== modified file 'tests/qmltests/Stages/tst_DesktopStage.qml'
531--- tests/qmltests/Stages/tst_DesktopStage.qml 2016-07-05 09:57:08 +0000
532+++ tests/qmltests/Stages/tst_DesktopStage.qml 2016-07-12 11:51:50 +0000
533@@ -534,14 +534,14 @@
534 verify(dashAppDelegate);
535 dashAppDelegate.requestedHeight = data.windowHeight;
536 dashAppDelegate.requestedY = data.windowY;
537- UbuntuKeyboardInfo.height = 0;
538+ SurfaceManager.inputMethodSurface.setInputBounds(Qt.rect(0, 0, 0, 0));
539 var initialY = dashAppDelegate.y;
540 verify(initialY > PanelState.panelHeight);
541
542- UbuntuKeyboardInfo.height = root.height / 2;
543+ SurfaceManager.inputMethodSurface.setInputBounds(Qt.rect(0, root.height / 2, root.width, root.height / 2));
544 tryCompare(dashAppDelegate, "y", data.targetDisplacement);
545
546- UbuntuKeyboardInfo.height = 0;
547+ SurfaceManager.inputMethodSurface.setInputBounds(Qt.rect(0, 0, 0, 0));
548 tryCompare(dashAppDelegate, "y", initialY);
549 SurfaceManager.inputMethodSurface.state = oldOSKState;
550 }
551
552=== modified file 'tests/qmltests/Tutorial/tst_Tutorial.qml'
553--- tests/qmltests/Tutorial/tst_Tutorial.qml 2016-06-10 14:36:50 +0000
554+++ tests/qmltests/Tutorial/tst_Tutorial.qml 2016-07-12 11:51:50 +0000
555@@ -715,7 +715,7 @@
556 surface.setState(Mir.RestoredState);
557
558 var inputMethod = findInvisibleChild(shell, "inputMethod");
559- tryCompare(inputMethod, "state", "shown");
560+ tryCompare(inputMethod, "visible", true);
561
562 verify(tutorialLeftLoader.shown);
563 }

Subscribers

People subscribed via source and target branches