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

Proposed by Daniel d'Andrada
Status: Superseded
Proposed branch: lp://qastaging/~dandrader/unity8/cursorConfinement
Merge into: lp://qastaging/unity8
Diff against target: 576 lines (+181/-25)
19 files modified
CMakeLists.txt (+1/-1)
debian/control (+6/-4)
plugins/Cursor/MousePointer.cpp (+42/-1)
plugins/Cursor/MousePointer.h (+10/-0)
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt (+3/-1)
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp (+2/-1)
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h (+2/-1)
plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.cpp (+2/-2)
plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.h (+71/-4)
plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h (+3/-6)
qml/Dash/Previews/PreviewProgress.qml (+5/-1)
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/Ubuntu/DownloadDaemonListener/MockDownloadTracker.cpp (+3/-1)
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.h (+2/-1)
tests/mocks/Unity/Application/MirSurface.h (+2/-0)
tests/qmltests/Dash/Previews/tst_PreviewProgress.qml (+14/-1)
To merge this branch: bzr merge lp://qastaging/~dandrader/unity8/cursorConfinement
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+303986@code.qastaging.launchpad.net

This proposal has been superseded by 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 :

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)
2601. By Alfonso Sanchez-Beato

Make sure we emit sounds when taking a screenshot even after media-hub
has restarted (LP: #1544477) (LP: #1544477)

2602. By CI Train Bot Account

Releasing 8.14+16.10.20160826-0ubuntu1

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

+ 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 :

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 :

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 :

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 :

> 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 :

> > 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 :

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 :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

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 :

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 :

> 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 :

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
2603. By CI Train Bot Account

Resync trunk.

2604. By Daniel d'Andrada

Added implementation for MirSurfaceInterface::persistentId

Approved by: Daniel d'Andrada

2605. By CI Train Bot Account

Releasing 8.14+16.10.20160831.3-0ubuntu1

2606. By CI Train Bot Account

Resync trunk.

2607. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

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

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches