@@ -130,10 +130,18 @@ FocusScope {
131 id: underlay
131 id: underlay
132 anchors.fill: parent
132 anchors.fill: parent
134+ // Whether the underlay is fully covered by opaque UI elements.
133− visible: !(panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
135+ property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
134− && (stages.fullyHidden
136+
137+ // Whether the user should see the topmost application surface (if there's one at all).
138+ property bool applicationSurfaceShouldBeSeen:
139+ (mainStage.applications && mainStage.applications.count > 0)
135− || (stages.fullyShown && mainStage.usingScreenshots)
140+ && (!stages.fullyHidden && !mainStage.usingScreenshots)
136− || !stages.fullyShown && (mainStage.usingScreenshots || (sideStage.shown && sideStage.usingScreenshots)))
141+
142+ // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
143+ // through the translucent parts of the shell surface.
144+ visible: !fullyCovered && !applicationSurfaceShouldBeSeen
139 id: backgroundImage
147 id: backgroundImage
@@ -178,7 +186,7 @@ FocusScope {
181− // FIXME: only necessary because stagesRevealer.animatedProgress and
189+ // FIXME: only necessary because stagesOuterContainer.showProgress and
182 // greeterRevealer.animatedProgress are not animated
190 // greeterRevealer.animatedProgress are not animated
183 Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
191 Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
@@ -254,6 +262,7 @@ FocusScope {
255 anchors.fill: parent
263 anchors.fill: parent
256 fullyShown: stages.fullyShown
264 fullyShown: stages.fullyShown
265+ fullyHidden: stages.fullyHidden
257 shouldUseScreenshots: !fullyShown
266 shouldUseScreenshots: !fullyShown
258 rightEdgeEnabled: !sideStage.enabled
267 rightEdgeEnabled: !sideStage.enabled
@@ -338,7 +347,7 @@ FocusScope {
340 DragHandle {
349 DragHandle {
341− id: stagesRevealer
350+ id: stagesDragHandle
343 anchors.top: parent.top
352 anchors.top: parent.top
344 anchors.bottom: parent.bottom
353 anchors.bottom: parent.bottom
@@ -346,7 +355,11 @@ FocusScope {
347 width: shell.edgeSize
356 width: shell.edgeSize
348 direction: Direction.Leftwards
357 direction: Direction.Leftwards
349− enabled: mainStage.applications.count > 0 || sideStage.applications.count > 0
358+ property bool haveApps: mainStage.applications.count > 0 || sideStage.applications.count > 0
360+ maxTotalDragDistance: haveApps ? parent.width : parent.width * 0.7
361+ // Make autocompletion impossible when !haveApps
362+ edgeDragEvaluator.minDragDistance: haveApps ? maxTotalDragDistance * 0.1 : Number.MAX_VALUE