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

Proposed by Daniel d'Andrada
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2610
Merged at revision: 2638
Proposed branch: lp:~dandrader/unity8/cursorConfinement
Merge into: lp:unity8
Prerequisite: lp:~unity-team/unity8/processing-indterminate
Diff against target: 260 lines (+73/-6)
10 files modified
CMakeLists.txt (+1/-1)
debian/control (+3/-3)
plugins/Cursor/MousePointer.cpp (+42/-1)
plugins/Cursor/MousePointer.h (+10/-0)
qml/Shell.qml (+2/-0)
qml/Stages/AbstractStage.qml (+3/-0)
qml/Stages/DecoratedWindow.qml (+2/-0)
qml/Stages/DesktopStage.qml (+6/-0)
tests/mocks/Cursor/Cursor.qml (+2/-1)
tests/mocks/Unity/Application/MirSurface.h (+2/-0)
To merge this branch: bzr merge lp:~dandrader/unity8/cursorConfinement
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Lukáš Tinkl (community) Approve
Review via email: mp+304789@code.launchpad.net

This proposal supersedes a proposal from 2016-09-01.

Commit message

Implement cursor confinement

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~dandrader/unity-api/cursorConfinement/+merge/303984
https://code.launchpad.net/~dandrader/qtmir/cursorConfinement/+merge/303987

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

For testing, build and run this application: lp:~dandrader/+junk/confinedCursor

Clicking on its big button will turn cursor confinement on/off

* 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.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2600
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2039/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2675/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2703
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2576
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2576
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2576
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2570/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2570/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

+ itemConfiningMouseCursor: ...

I'd prefer this being an inline binding, instead of the returns. How about sth like:

itemConfiningMouseCursor: priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
                          priv.focusedAppDelegate.surface.confinesMousePointer ?
                          priv.focusedAppDelegate.clientAreaItem : null;

review: Needs Information
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

On 26/08/2016 11:20, Lukáš Tinkl wrote:
> Review: Needs Information
>
> + itemConfiningMouseCursor: ...
>
> I'd prefer this being an inline binding, instead of the returns. How about sth like:
>
> itemConfiningMouseCursor: priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
> priv.focusedAppDelegate.surface.confinesMousePointer ?
> priv.focusedAppDelegate.clientAreaItem : null;
>
>
Done.

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

FAILED: Continuous integration, rev:2601
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2042/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2684/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2712
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2585
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2585
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2585
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2578/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2578/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

What happens, when the window moves under cursor (e.g. press Ctrl+Super+Right to semi maximize on the right edge)? Will the cursor be still captured correctly?

review: Needs Information
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

> What happens, when the window moves under cursor (e.g. press Ctrl+Super+Right
> to semi maximize on the right edge)? Will the cursor be still captured
> correctly?

I'm guessing what you mean is this:

1 - mouse is confined to a non-fullscreen window, positioned over the left side of the desktop
2 - You press Ctrl+Super+Right

What will happen is that the cursor will jump to be within the window client area the next time you start to move the mouse.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

> > What happens, when the window moves under cursor (e.g. press
> Ctrl+Super+Right
> > to semi maximize on the right edge)? Will the cursor be still captured
> > correctly?
>
> I'm guessing what you mean is this:
>
> 1 - mouse is confined to a non-fullscreen window, positioned over the left
> side of the desktop
> 2 - You press Ctrl+Super+Right
>
> What will happen is that the cursor will jump to be within the window client
> area the next time you start to move the mouse.

Yeah I kinda expected that... do you think it makes sense to improve the situation when the window gets moved/resized under the cursor?

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Explanation, I know you can't resize the window when the cursor is confined, but you're still able to resize it/ move it using for example the touch controls, that's my main concern.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

On 30/08/2016 11:39, Lukáš Tinkl wrote:
> [...]
> Yeah I kinda expected that... do you think it makes sense to improve the situation when the window gets moved/resized under the cursor?

Don't think this corner case is worth the extra complexity involved.
It's not simply tracking changes to the x,y,width,height of the client
area (eg: its x,y won't change when the window moves around). Would have
to add a signal to AbstractStage that would say "hey, client area
changed its geometry in scene coords" and in Shell.qml I would wire it
to some update function in Cursor. Then in DesktopStage I would emit
this signal whenever the focused window changed its geometry.

But if you think this is relevant enough, I can look into it.

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

On 30/08/2016 11:40, Lukáš Tinkl wrote:
> Explanation, I know you can't resize the window when the cursor is confined, but you're still able to resize it/ move it using for example the touch controls, that's my main concern.

Have you tried moving or resizing the window with touch while at the
same time moving the cursor with a mouse/touchpad? It's a disaster :)

Maybe we should report a bug on it...

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

> On 30/08/2016 11:39, Lukáš Tinkl wrote:
> > [...]
> > Yeah I kinda expected that... do you think it makes sense to improve the
> situation when the window gets moved/resized under the cursor?
>
> Don't think this corner case is worth the extra complexity involved.
> It's not simply tracking changes to the x,y,width,height of the client
> area (eg: its x,y won't change when the window moves around). Would have
> to add a signal to AbstractStage that would say "hey, client area
> changed its geometry in scene coords" and in Shell.qml I would wire it
> to some update function in Cursor. Then in DesktopStage I would emit
> this signal whenever the focused window changed its geometry.
>
> But if you think this is relevant enough, I can look into it.

I don't know... I guess not since this is highly dependent on the intended use case (I assume this is meant mainly for fullscreen apps, like games?)

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Alright then, this sounds good for the initial iteration

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

Yes, with the demo provided (no real app using this to my knowledge)

* Did CI run pass? If not, please explain why.

No, due to unity-api bump

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2606
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2091/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2739/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2767
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2640
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2640
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2640
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2632/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2632/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Yup, still good

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2607
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2093/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2741/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2769
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2642
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2642
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2642
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2634/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2634/console

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

review: Needs Fixing (continuous-integration)
2606. By CI Train Bot Account

Resync trunk.

2607. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Needs updating tests/mocks/Cursor/Cursor.qml

+ property Item confiningItem

review: Needs Fixing
2608. By Daniel d'Andrada

merge lp:~mterry/unity8/default-wallpaper

2609. By dobey

Set progress bar indeterminate when processing signal received.

2610. By Daniel d'Andrada

Implement cursor confinement

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 05/09/2016 18:16, Lukáš Tinkl wrote:
> Review: Needs Fixing
>
> Needs updating tests/mocks/Cursor/Cursor.qml
>
> + property Item confiningItem

Fixed.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Seems good now

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2610
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2125/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2610
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2127/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2795/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2823
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2683/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2683
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2683/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2683/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2610
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2139/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2811
    ABORTED: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1557/console
    ABORTED: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1557/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1557
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2839
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2698/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2698
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2698/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2610
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2147/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2824
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1567
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1567
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1567
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2852
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2710/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2710
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2710/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)

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-08-22 16:58:28 +0000
3+++ CMakeLists.txt 2016-09-06 17:42:34 +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=21)
9+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=22)
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/control'
15--- debian/control 2016-09-06 17:42:33 +0000
16+++ debian/control 2016-09-06 17:42:34 +0000
17@@ -37,7 +37,7 @@
18 libubuntugestures5-private-dev (>= 1.3.2030),
19 libudev-dev,
20 libudm-common-dev,
21- libunity-api-dev (>= 7.118),
22+ libunity-api-dev (>= 7.119),
23 libusermetricsoutput1-dev,
24 # Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
25 libx11-dev[!arm64 !armhf],
26@@ -157,7 +157,7 @@
27 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
28 ubuntu-thumbnailer-impl-0,
29 ubuntu-wallpapers,
30- unity-application-impl-21,
31+ unity-application-impl-22,
32 unity-notifications-impl-3,
33 unity-plugin-scopes | unity-scopes-impl,
34 unity-scopes-impl-12,
35@@ -203,7 +203,7 @@
36 Depends: ${misc:Depends},
37 ${shlibs:Depends},
38 Provides: unity-application-impl,
39- unity-application-impl-21,
40+ unity-application-impl-22,
41 Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)
42 Description: Fake environment for running Unity 8 shell
43 Provides fake implementations of some QML modules used by Unity 8 shell
44
45=== modified file 'plugins/Cursor/MousePointer.cpp'
46--- plugins/Cursor/MousePointer.cpp 2016-06-20 07:27:19 +0000
47+++ plugins/Cursor/MousePointer.cpp 2016-09-06 17:42:34 +0000
48@@ -56,7 +56,6 @@
49 Q_EMIT pushedRightBoundary(newX - (parentItem()->width() - 1), buttons);
50 newX = parentItem()->width() - 1;
51 }
52- setX(newX);
53
54 qreal newY = y() + appliedMovement.y();
55 if (newY < 0) {
56@@ -64,6 +63,10 @@
57 } else if (newY >= parentItem()->height()) {
58 newY = parentItem()->height() - 1;
59 }
60+
61+ applyItemConfinement(newX, newY);
62+
63+ setX(newX);
64 setY(newY);
65
66 QPointF scenePosition = mapToItem(nullptr, QPointF(0, 0));
67@@ -71,6 +74,31 @@
68 buttons, modifiers);
69 }
70
71+void MousePointer::applyItemConfinement(qreal &newX, qreal &newY)
72+{
73+ Q_ASSERT(parentItem() != nullptr);
74+
75+ if (m_confiningItem.isNull()) {
76+ return;
77+ }
78+
79+ QRectF confiningItemGeometry(0, 0, m_confiningItem->width(), m_confiningItem->height());
80+
81+ QRectF confiningRect = m_confiningItem->mapRectToItem(parentItem(), confiningItemGeometry);
82+
83+ if (newX < confiningRect.x()) {
84+ newX = confiningRect.x();
85+ } else if (newX > confiningRect.right()) {
86+ newX = confiningRect.right();
87+ }
88+
89+ if (newY < confiningRect.y()) {
90+ newY = confiningRect.y();
91+ } else if (newY > confiningRect.bottom()) {
92+ newY = confiningRect.bottom();
93+ }
94+}
95+
96 void MousePointer::handleWheelEvent(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers modifiers)
97 {
98 if (!parentItem()) {
99@@ -156,3 +184,16 @@
100 {
101 CursorImageProvider::instance()->setCustomCursor(customCursor);
102 }
103+
104+QQuickItem* MousePointer::confiningItem() const
105+{
106+ return m_confiningItem.data();
107+}
108+
109+void MousePointer::setConfiningItem(QQuickItem *item)
110+{
111+ if (item != m_confiningItem) {
112+ m_confiningItem = item;
113+ Q_EMIT confiningItemChanged();
114+ }
115+}
116
117=== modified file 'plugins/Cursor/MousePointer.h'
118--- plugins/Cursor/MousePointer.h 2016-06-17 01:13:22 +0000
119+++ plugins/Cursor/MousePointer.h 2016-09-06 17:42:34 +0000
120@@ -27,6 +27,9 @@
121
122 class MousePointer : public MirMousePointerInterface {
123 Q_OBJECT
124+
125+ Q_PROPERTY(QQuickItem* confiningItem READ confiningItem WRITE setConfiningItem NOTIFY confiningItemChanged)
126+
127 public:
128 MousePointer(QQuickItem *parent = nullptr);
129
130@@ -38,6 +41,9 @@
131
132 void setCustomCursor(const QCursor &) override;
133
134+ QQuickItem* confiningItem() const;
135+ void setConfiningItem(QQuickItem*);
136+
137 public Q_SLOTS:
138 void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
139 Qt::KeyboardModifiers modifiers) override;
140@@ -47,6 +53,7 @@
141 void pushedLeftBoundary(qreal amount, Qt::MouseButtons buttons);
142 void pushedRightBoundary(qreal amount, Qt::MouseButtons buttons);
143 void mouseMoved();
144+ void confiningItemChanged();
145
146 protected:
147 void itemChange(ItemChange change, const ItemChangeData &value) override;
148@@ -56,6 +63,7 @@
149
150 private:
151 void registerWindow(QWindow *window);
152+ void applyItemConfinement(qreal &newX, qreal &newY);
153
154 QPointer<QWindow> m_registeredWindow;
155 QPointer<QScreen> m_registeredScreen;
156@@ -64,6 +72,8 @@
157
158 // Accumulated, unapplied, mouse movement.
159 QPointF m_accumulatedMovement;
160+
161+ QPointer<QQuickItem> m_confiningItem;
162 };
163
164 #endif // MOUSEPOINTER_H
165
166=== modified file 'qml/Shell.qml'
167--- qml/Shell.qml 2016-09-06 17:42:33 +0000
168+++ qml/Shell.qml 2016-09-06 17:42:34 +0000
169@@ -814,6 +814,8 @@
170 visible: shell.hasMouse
171 z: itemGrabber.z + 1
172
173+ confiningItem: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.itemConfiningMouseCursor : null
174+
175 property bool mouseNeverMoved: true
176 Binding {
177 target: cursor; property: "x"; value: shell.width / 2
178
179=== modified file 'qml/Stages/AbstractStage.qml'
180--- qml/Stages/AbstractStage.qml 2016-07-12 09:43:50 +0000
181+++ qml/Stages/AbstractStage.qml 2016-09-06 17:42:34 +0000
182@@ -55,6 +55,9 @@
183 | Qt.InvertedPortraitOrientation
184 | Qt.InvertedLandscapeOrientation
185
186+ property Item itemConfiningMouseCursor: null
187+
188+
189 signal stageAboutToBeUnloaded
190 signal itemSnapshotRequested(Item item)
191
192
193=== modified file 'qml/Stages/DecoratedWindow.qml'
194--- qml/Stages/DecoratedWindow.qml 2016-08-08 11:18:19 +0000
195+++ qml/Stages/DecoratedWindow.qml 2016-09-06 17:42:34 +0000
196@@ -53,6 +53,8 @@
197
198 property alias overlayShown: decoration.overlayShown
199
200+ readonly property Item clientAreaItem: applicationWindow
201+
202 signal closeClicked()
203 signal maximizeClicked()
204 signal maximizeHorizontallyClicked()
205
206=== modified file 'qml/Stages/DesktopStage.qml'
207--- qml/Stages/DesktopStage.qml 2016-09-06 17:42:33 +0000
208+++ qml/Stages/DesktopStage.qml 2016-09-06 17:42:34 +0000
209@@ -52,6 +52,11 @@
210
211 orientationChangesEnabled: true
212
213+
214+ itemConfiningMouseCursor: !spreadShown && priv.focusedAppDelegate && priv.focusedAppDelegate.surface &&
215+ priv.focusedAppDelegate.surface.confinesMousePointer ?
216+ priv.focusedAppDelegate.clientAreaItem : null;
217+
218 GlobalShortcut {
219 id: showSpreadShortcut
220 shortcut: Qt.MetaModifier|Qt.Key_W
221@@ -335,6 +340,7 @@
222 readonly property alias focusedSurface: decoratedWindow.focusedSurface
223
224 readonly property bool isDash: model.application.appId == "unity8-dash"
225+ readonly property alias clientAreaItem: decoratedWindow.clientAreaItem
226
227 function claimFocus() {
228 if (spread.state == "altTab") {
229
230=== modified file 'tests/mocks/Cursor/Cursor.qml'
231--- tests/mocks/Cursor/Cursor.qml 2015-12-03 15:40:07 +0000
232+++ tests/mocks/Cursor/Cursor.qml 2016-09-06 17:42:34 +0000
233@@ -1,5 +1,5 @@
234 /*
235- * Copyright (C) 2015 Canonical, Ltd.
236+ * Copyright (C) 2015-2016 Canonical, Ltd.
237 *
238 * This program is free software; you can redistribute it and/or modify
239 * it under the terms of the GNU General Public License as published by
240@@ -17,6 +17,7 @@
241 import QtQuick 2.4
242
243 Item {
244+ property Item confiningItem
245 signal pushedLeftBoundary(real amount, int buttons)
246 signal pushedRightBoundary(real amount, int buttons)
247 signal mouseMoved()
248
249=== modified file 'tests/mocks/Unity/Application/MirSurface.h'
250--- tests/mocks/Unity/Application/MirSurface.h 2016-08-22 16:58:28 +0000
251+++ tests/mocks/Unity/Application/MirSurface.h 2016-09-06 17:42:34 +0000
252@@ -106,6 +106,8 @@
253 bool focused() const override;
254 QRect inputBounds() const override;
255
256+ bool confinesMousePointer() const override { return false; }
257+
258 Q_INVOKABLE void requestFocus() override;
259
260 Q_INVOKABLE void close() override;

Subscribers

People subscribed via source and target branches