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

Proposed by Albert Astals Cid
Status: Superseded
Proposed branch: lp:~aacid/unity8/eatHoverWhenLauncherMenuIsOpen
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/eatHoverWhenMenuIsOpen
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
Unity8 CI Bot continuous-integration Approve
Michael Zanetti (community) Needs Information
Review via email: mp+315898@code.launchpad.net

This proposal has been superseded by a proposal from 2017-01-31.

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?
Prereq (well probably not really needed, but easier to build on the top of fixes)

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

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 :

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 :

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)
2801. By Albert Astals Cid

Eat hover events when the launcher quicklist is open

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

2802. By Albert Astals Cid

Put the test in a different place so merges better

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Launcher/Launcher.qml'
--- qml/Launcher/Launcher.qml 2017-01-24 07:42:24 +0000
+++ qml/Launcher/Launcher.qml 2017-01-31 14:34:39 +0000
@@ -307,7 +307,8 @@
307 InverseMouseArea {307 InverseMouseArea {
308 id: closeMouseArea308 id: closeMouseArea
309 anchors.fill: panel309 anchors.fill: panel
310 enabled: root.state == "visible" || root.state == "drawer"310 enabled: (root.state == "visible" && !root.lockedVisible) || root.state == "drawer" || hoverEnabled
311 hoverEnabled: panel.quickListOpen
311 visible: enabled312 visible: enabled
312 onPressed: {313 onPressed: {
313 mouse.accepted = false;314 mouse.accepted = false;
314315
=== modified file 'qml/Launcher/LauncherPanel.qml'
--- qml/Launcher/LauncherPanel.qml 2017-01-16 11:12:00 +0000
+++ qml/Launcher/LauncherPanel.qml 2017-01-31 14:34:39 +0000
@@ -35,6 +35,7 @@
35 || dndArea.containsMouse || dashItem.hovered35 || dndArea.containsMouse || dashItem.hovered
36 property int highlightIndex: -236 property int highlightIndex: -2
37 property bool shortcutHintsShown: false37 property bool shortcutHintsShown: false
38 readonly property bool quickListOpen: quickList.state === "open"
3839
39 signal applicationSelected(string appId)40 signal applicationSelected(string appId)
40 signal showDashHome()41 signal showDashHome()
@@ -686,6 +687,8 @@
686 InverseMouseArea {687 InverseMouseArea {
687 anchors.fill: quickListShape688 anchors.fill: quickListShape
688 enabled: quickList.state == "open" || pressed689 enabled: quickList.state == "open" || pressed
690 hoverEnabled: enabled
691 visible: enabled
689692
690 onClicked: {693 onClicked: {
691 quickList.state = "";694 quickList.state = "";
692695
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2017-01-24 07:43:54 +0000
+++ tests/qmltests/tst_Shell.qml 2017-01-31 14:34:39 +0000
@@ -2732,6 +2732,28 @@
2732 keyRelease(Qt.Key_W, Qt.MetaModifier)2732 keyRelease(Qt.Key_W, Qt.MetaModifier)
2733 }2733 }
27342734
2735 function test_launcherWindowResizeInteraction()
2736 {
2737 loadShell("desktop");
2738 waitForRendering(shell)
2739 shell.usageScenario = "desktop"
2740 waitForRendering(shell)
2741 swipeAwayGreeter();
2742
2743 var app1SurfaceId = topLevelSurfaceList.nextId;
2744 var app1 = ApplicationManager.startApplication("dialer-app")
2745 waitUntilAppWindowIsFullyLoaded(app1SurfaceId);
2746
2747 var launcherDelegate1 = findChild(shell, "launcherDelegate1");
2748 mouseClick(launcherDelegate1, launcherDelegate1.width / 2, launcherDelegate1.height / 2, Qt.RightButton);
2749
2750 var appDelegate = findChild(shell, "appDelegate_" + app1SurfaceId);
2751 mouseMove(shell, appDelegate.mapToItem(shell, 0, 0).x, launcherDelegate1.mapToItem(shell, 0, 0).y);
2752
2753 expectFail("", "Cursor should not change while launcher menu is open");
2754 tryCompare(Mir, "cursorName", "left_side");
2755 }
2756
2735 function test_panelTitleShowsWhenGreeterNotShown_data() {2757 function test_panelTitleShowsWhenGreeterNotShown_data() {
2736 return [2758 return [
2737 {tag: "phone" },2759 {tag: "phone" },

Subscribers

People subscribed via source and target branches