on xenial help sign in
always close the spread on left edge swipe
8197a72Michael Zanetti
qml/Shell.qml+2−1
@@ -442,9 +442,10 @@ StyledItem {
442 }
442 }
443
443
444 if (!greeter.locked && tutorial.launcherLongSwipeEnabled
444 if (!greeter.locked && tutorial.launcherLongSwipeEnabled
445− && ApplicationManager.focusedApplicationId != "unity8-dash") {
445+ && (ApplicationManager.focusedApplicationId != "unity8-dash" || stage.spreadShown)) {
446 ApplicationManager.requestFocusApplication("unity8-dash")
446 ApplicationManager.requestFocusApplication("unity8-dash")
447 launcher.fadeOut();
447 launcher.fadeOut();
448+ stage.closeSpread();
448 }
449 }
449 }
450 }
450
451
qml/Stage/Stage.qml+5−1
@@ -53,12 +53,12 @@ FocusScope {
53 property real leftEdgeDragProgress: 0
53 property real leftEdgeDragProgress: 0
54
54
55 // Used by the tutorial code
55 // Used by the tutorial code
56− readonly property bool spreadShown: state == "spread"
57 readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged
56 readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged
58
57
59 // used by the snap windows (edge maximize) feature
58 // used by the snap windows (edge maximize) feature
60 readonly property alias previewRectangle: fakeRectangle
59 readonly property alias previewRectangle: fakeRectangle
61
60
61+ readonly property bool spreadShown: state == "spread"
62 readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
62 readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
63
63
64 // application windows never rotate independently
64 // application windows never rotate independently
@@ -105,6 +105,10 @@ FocusScope {
105 edgeBarrier.push(amount);
105 edgeBarrier.push(amount);
106 }
106 }
107
107
108+ function closeSpread() {
109+ priv.goneToSpread = false;
110+ }
111+
108 onSpreadEnabledChanged: {
112 onSpreadEnabledChanged: {
109 if (!spreadEnabled && root.state == "spread") {
113 if (!spreadEnabled && root.state == "spread") {
110 priv.goneToSpread = false;
114 priv.goneToSpread = false;