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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2778
Merged at revision: 2814
Proposed branch: lp:~aacid/unity8/eatHoverWhenMenuIsOpen
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/noClickThroughMenus
Diff against target: 38 lines (+18/-0)
2 files modified
qml/ApplicationMenus/MenuBar.qml (+1/-0)
tests/qmltests/Stage/tst_DesktopStage.qml (+17/-0)
To merge this branch: bzr merge lp:~aacid/unity8/eatHoverWhenMenuIsOpen
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+315748@code.launchpad.net

Commit message

Make the MenuBar InverseMouseArea eat hover events when there's a popup open

Description of the change

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

 * 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
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2778
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3064/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3985
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2332
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2332
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4013
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3857
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3857/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3857
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3857/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3857
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3857/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3857
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3857/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3857
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3857/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3857
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3857/artifact/output/*zip*/output.zip

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

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

works fine, looks good. CI happy too

review: Approve
2779. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/ApplicationMenus/MenuBar.qml'
2--- qml/ApplicationMenus/MenuBar.qml 2017-02-07 15:46:50 +0000
3+++ qml/ApplicationMenus/MenuBar.qml 2017-02-07 15:46:50 +0000
4@@ -75,6 +75,7 @@
5 acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
6 anchors.fill: parent
7 enabled: d.currentItem != null
8+ hoverEnabled: enabled && d.currentItem.__popup != null
9 onPressed: d.dismissAll()
10 }
11
12
13=== modified file 'tests/qmltests/Stage/tst_DesktopStage.qml'
14--- tests/qmltests/Stage/tst_DesktopStage.qml 2017-02-07 15:46:50 +0000
15+++ tests/qmltests/Stage/tst_DesktopStage.qml 2017-02-07 15:46:50 +0000
16@@ -955,5 +955,22 @@
17 expectFail("", "Double clicking a menu should not change the window below");
18 tryCompareFunction(function() { return appDelegate1.windowState != previousWindowState; }, true);
19 }
20+
21+ function test_openMenuEatsHoverOutsideIt() {
22+ var appDelegate = startApplication("gmail-webapp");
23+
24+ var wd = findChild(appDelegate, "appWindowDecoration");
25+ var closeButton = findChild(wd, "closeWindowButton");
26+
27+ // Open menu
28+ var menuItem = findChild(appDelegate, "menuBar-item3");
29+ menuItem.show();
30+ var menu = findChild(appDelegate, "menuBar-item3-menu");
31+ tryCompare(menu, "visible", true);
32+
33+ mouseMove(closeButton, closeButton.width/2, closeButton.height/2);
34+ expectFail("", "Hovering the window controls should be ignored when the menu is open");
35+ tryCompare(closeButton, "containsMouse", true);
36+ }
37 }
38 }

Subscribers

People subscribed via source and target branches