Merge lp:~aacid/unity8/eatHoverWhenLauncherMenuIsOpen into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2802
Merged at revision: 2828
Proposed branch: lp:~aacid/unity8/eatHoverWhenLauncherMenuIsOpen
Merge into: lp:unity8
Diff against target: 67 lines (+27/-1)
3 files modified
qml/Launcher/Launcher.qml (+2/-1)
qml/Launcher/LauncherPanel.qml (+3/-0)
tests/qmltests/tst_Shell.qml (+22/-0)
To merge this branch: bzr merge lp:~aacid/unity8/eatHoverWhenLauncherMenuIsOpen
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+316016@code.launchpad.net

This proposal supersedes a proposal from 2017-01-30.

Commit message

Eat hover events when the launcher quicklist is open

This way we don't change the mouse cursor wrongly to resize windows for example

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * 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?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

why do we need two mouse areas with hoverEnabled? Also I'm not sure why the change in Launcher.qml is required.

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

We need the one in LauncherPanel to filter everything outside the quicklist and we need the one in Launcher to filter the quicklist itself.

> Also I'm not sure why the change in Launcher.qml is required.
You mean the enabled: change to include !root.lockedVisible? It's not really needed but saves up some cpu if you're running with that mode since otherwise the inversemousearea is executing contains() for every single move, and it's not really cheap.

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

PASSED: Continuous integration, rev:2779
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3078/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4001
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2344
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2344
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4029
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3873
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3873/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3873
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3873/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3873
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3873/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3873
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3873/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3873
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3873/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3873
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3873/artifact/output/*zip*/output.zip

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

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

FAILED: Continuous integration, rev:2802
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3095/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/4023/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4051
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3895
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3895/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3895
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3895/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3895
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3895/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3895/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3895
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3895/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3895
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3895/artifact/output/*zip*/output.zip

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

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

PASSED: Continuous integration, rev:2802
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3099/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4027
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2360
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2360
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4055
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3899/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

ok then. change works fine. code looks good, ci is happy too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Launcher/Launcher.qml'
2--- qml/Launcher/Launcher.qml 2017-01-24 07:42:24 +0000
3+++ qml/Launcher/Launcher.qml 2017-01-31 14:34:47 +0000
4@@ -307,7 +307,8 @@
5 InverseMouseArea {
6 id: closeMouseArea
7 anchors.fill: panel
8- enabled: root.state == "visible" || root.state == "drawer"
9+ enabled: (root.state == "visible" && !root.lockedVisible) || root.state == "drawer" || hoverEnabled
10+ hoverEnabled: panel.quickListOpen
11 visible: enabled
12 onPressed: {
13 mouse.accepted = false;
14
15=== modified file 'qml/Launcher/LauncherPanel.qml'
16--- qml/Launcher/LauncherPanel.qml 2017-01-16 11:12:00 +0000
17+++ qml/Launcher/LauncherPanel.qml 2017-01-31 14:34:47 +0000
18@@ -35,6 +35,7 @@
19 || dndArea.containsMouse || dashItem.hovered
20 property int highlightIndex: -2
21 property bool shortcutHintsShown: false
22+ readonly property bool quickListOpen: quickList.state === "open"
23
24 signal applicationSelected(string appId)
25 signal showDashHome()
26@@ -686,6 +687,8 @@
27 InverseMouseArea {
28 anchors.fill: quickListShape
29 enabled: quickList.state == "open" || pressed
30+ hoverEnabled: enabled
31+ visible: enabled
32
33 onClicked: {
34 quickList.state = "";
35
36=== modified file 'tests/qmltests/tst_Shell.qml'
37--- tests/qmltests/tst_Shell.qml 2017-01-24 07:43:54 +0000
38+++ tests/qmltests/tst_Shell.qml 2017-01-31 14:34:47 +0000
39@@ -2732,6 +2732,28 @@
40 keyRelease(Qt.Key_W, Qt.MetaModifier)
41 }
42
43+ function test_launcherWindowResizeInteraction()
44+ {
45+ loadShell("desktop");
46+ waitForRendering(shell)
47+ shell.usageScenario = "desktop"
48+ waitForRendering(shell)
49+ swipeAwayGreeter();
50+
51+ var app1SurfaceId = topLevelSurfaceList.nextId;
52+ var app1 = ApplicationManager.startApplication("dialer-app")
53+ waitUntilAppWindowIsFullyLoaded(app1SurfaceId);
54+
55+ var launcherDelegate1 = findChild(shell, "launcherDelegate1");
56+ mouseClick(launcherDelegate1, launcherDelegate1.width / 2, launcherDelegate1.height / 2, Qt.RightButton);
57+
58+ var appDelegate = findChild(shell, "appDelegate_" + app1SurfaceId);
59+ mouseMove(shell, appDelegate.mapToItem(shell, 0, 0).x, launcherDelegate1.mapToItem(shell, 0, 0).y);
60+
61+ expectFail("", "Cursor should not change while launcher menu is open");
62+ tryCompare(Mir, "cursorName", "left_side");
63+ }
64+
65 function test_panelTitleShowsWhenGreeterNotShown_data() {
66 return [
67 {tag: "phone" },

Subscribers

People subscribed via source and target branches