on xenial help sign in
Eat hover events when the launcher quicklist is open
2896d09Albert Astals Cid
qml/Launcher/Launcher.qml+2−1
@@ -307,7 +307,8 @@ FocusScope {
307 InverseMouseArea {
307 InverseMouseArea {
308 id: closeMouseArea
308 id: closeMouseArea
309 anchors.fill: panel
309 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: enabled
312 visible: enabled
312 onPressed: {
313 onPressed: {
313 mouse.accepted = false;
314 mouse.accepted = false;
qml/Launcher/LauncherPanel.qml+3
@@ -35,6 +35,7 @@ Rectangle {
35 || dndArea.containsMouse || dashItem.hovered
35 || dndArea.containsMouse || dashItem.hovered
36 property int highlightIndex: -2
36 property int highlightIndex: -2
37 property bool shortcutHintsShown: false
37 property bool shortcutHintsShown: false
38+ readonly property bool quickListOpen: quickList.state === "open"
38
39
39 signal applicationSelected(string appId)
40 signal applicationSelected(string appId)
40 signal showDashHome()
41 signal showDashHome()
@@ -686,6 +687,8 @@ Rectangle {
686 InverseMouseArea {
687 InverseMouseArea {
687 anchors.fill: quickListShape
688 anchors.fill: quickListShape
688 enabled: quickList.state == "open" || pressed
689 enabled: quickList.state == "open" || pressed
690+ hoverEnabled: enabled
691+ visible: enabled
689
692
690 onClicked: {
693 onClicked: {
691 quickList.state = "";
694 quickList.state = "";
tests/qmltests/tst_Shell.qml+22
@@ -2779,5 +2779,27 @@ Rectangle {
2779 }
2779 }
2780 tryCompareFunction(function() { return drawer.visible; }, false);
2780 tryCompareFunction(function() { return drawer.visible; }, false);
2781 }
2781 }
2782+
2783+ function test_launcherWindowResizeInteraction()
2784+ {
2785+ loadShell("desktop");
2786+ waitForRendering(shell)
2787+ shell.usageScenario = "desktop"
2788+ waitForRendering(shell)
2789+ swipeAwayGreeter();
2790+
2791+ var app1SurfaceId = topLevelSurfaceList.nextId;
2792+ var app1 = ApplicationManager.startApplication("dialer-app")
2793+ waitUntilAppWindowIsFullyLoaded(app1SurfaceId);
2794+
2795+ var launcherDelegate1 = findChild(shell, "launcherDelegate1");
2796+ mouseClick(launcherDelegate1, launcherDelegate1.width / 2, launcherDelegate1.height / 2, Qt.RightButton);
2797+
2798+ var appDelegate = findChild(shell, "appDelegate_" + app1SurfaceId);
2799+ mouseMove(shell, appDelegate.mapToItem(shell, 0, 0).x, launcherDelegate1.mapToItem(shell, 0, 0).y);
2800+
2801+ expectFail("", "Cursor should not change while launcher menu is open");
2802+ tryCompare(Mir, "cursorName", "left_side");
2803+ }
2782 }
2804 }
2783}
2805}