on xenial help sign in
Property focus the foreground application surface
eb21682Daniel d'Andrada
qml/Shell.qml+5
@@ -275,6 +275,11 @@ FocusScope {
275 property: "maximizedAppTopMargin"
275 property: "maximizedAppTopMargin"
276 value: panel.panelHeight
276 value: panel.panelHeight
277 }
277 }
278+ Binding {
279+ target: applicationsDisplayLoader.item
280+ property: "interactive"
281+ value: stages.roughlyFullyShown
282+ }
278 }
283 }
279 }
284 }
280
285
qml/Stages/PhoneStage.qml+4−1
@@ -27,6 +27,7 @@ Item {
27 // Controls to be set from outside
27 // Controls to be set from outside
28 property int dragAreaWidth
28 property int dragAreaWidth
29 property real maximizedAppTopMargin
29 property real maximizedAppTopMargin
30+ property bool interactive
30
31
31 // State information propagated to the outside
32 // State information propagated to the outside
32 property bool fullscreen: priv.focusedApplication ? priv.focusedApplication.fullscreen : false
33 property bool fullscreen: priv.focusedApplication ? priv.focusedApplication.fullscreen : false
@@ -247,7 +248,9 @@ Item {
247 height: spreadView.height
248 height: spreadView.height
248 selected: spreadView.selectedIndex == index
249 selected: spreadView.selectedIndex == index
249 otherSelected: spreadView.selectedIndex >= 0 && !selected
250 otherSelected: spreadView.selectedIndex >= 0 && !selected
250− interactive: !spreadView.interactive
251+ interactive: !spreadView.interactive && spreadView.phase === 0
252+ && spreadView.shiftedContentX === 0 && root.interactive && index === 0
253+ swipeToCloseEnabled: spreadView.interactive
251 maximizedAppTopMargin: root.maximizedAppTopMargin
254 maximizedAppTopMargin: root.maximizedAppTopMargin
252 dropShadow: spreadView.shiftedContentX > 0 || spreadDragArea.status == DirectionalDragArea.Undecided
255 dropShadow: spreadView.shiftedContentX > 0 || spreadDragArea.status == DirectionalDragArea.Undecided
253
256
qml/Stages/SpreadDelegate.qml+7−1
@@ -24,9 +24,11 @@ import "../Components"
24Item {
24Item {
25 id: root
25 id: root
26
26
27+ // to be set from outside
27 property bool interactive: true
28 property bool interactive: true
28 property bool dropShadow: true
29 property bool dropShadow: true
29 property real maximizedAppTopMargin
30 property real maximizedAppTopMargin
31+ property alias swipeToCloseEnabled: dragArea.enabled
30
32
31 readonly property bool isFullscreen: surface !== null && surfaceContainer.surface.anchors.topMargin == 0
33 readonly property bool isFullscreen: surface !== null && surfaceContainer.surface.anchors.topMargin == 0
32
34
@@ -71,6 +73,11 @@ Item {
71 property: "enabled"
73 property: "enabled"
72 value: root.interactive
74 value: root.interactive
73 }
75 }
76+ Binding {
77+ target: surface
78+ property: "focus"
79+ value: root.interactive
80+ }
74
81
75 Timer { //FIXME - need to delay removing splash screen to allow surface resize to complete
82 Timer { //FIXME - need to delay removing splash screen to allow surface resize to complete
76 id: surfaceRevealDelay
83 id: surfaceRevealDelay
@@ -136,7 +143,6 @@ Item {
136 DraggingArea {
143 DraggingArea {
137 id: dragArea
144 id: dragArea
138 anchors.fill: parent
145 anchors.fill: parent
139− enabled: !root.interactive
140
146
141 property bool moving: false
147 property bool moving: false
142 property real distance: 0
148 property real distance: 0