@@ -57,6 +57,7 @@ Rectangle {
58 onAltTabPressedChanged: {
58 onAltTabPressedChanged: {
59 if (!altTabPressed && root.state == "altTab") {
59 if (!altTabPressed && root.state == "altTab") {
60+ print("released", appRepeater.highlightedIndex)
60 ApplicationManager.requestFocusApplication(ApplicationManager.get(appRepeater.highlightedIndex).appId)
61 ApplicationManager.requestFocusApplication(ApplicationManager.get(appRepeater.highlightedIndex).appId)
@@ -173,9 +174,7 @@ Rectangle {
173 objectName: "appRepeater"
174 objectName: "appRepeater"
175 property int highlightedIndex: -1
176 property int highlightedIndex: -1
176− onHighlightedIndexChanged: {
177+ property int closingIndex: -1
177− print("****** changed:", highlightedIndex)
180 delegate: FocusScope {
179 delegate: FocusScope {
181 id: appDelegate
180 id: appDelegate
@@ -198,6 +197,14 @@ Rectangle {
202+ enabled: appRepeater.closingIndex >= 0
203+ UbuntuNumberAnimation {
204+ onRunningChanged: if (!running) appRepeater.closingIndex = -1
201 states: [
208 states: [
203 name: "normal"
210 name: "normal"
@@ -321,7 +328,6 @@ Rectangle {
321 onMouseYChanged: evaluateContainsMouse()
328 onMouseYChanged: evaluateContainsMouse()
322 function evaluateContainsMouse() {
329 function evaluateContainsMouse() {
323 if (containsMouse) {
330 if (containsMouse) {
324− print("setting highlighted to", index)
325 appRepeater.highlightedIndex = index
331 appRepeater.highlightedIndex = index
@@ -360,7 +366,11 @@ Rectangle {
360 anchors.fill: closeImage
366 anchors.fill: closeImage
361 anchors.margins: -units.gu(1)
367 anchors.margins: -units.gu(1)
362 enabled: spreadSelectArea.enabled
368 enabled: spreadSelectArea.enabled
370+ print("enabling clsoeBehaviro")
371+ appRepeater.closingIndex = index;
363− onClicked: ApplicationManager.stopApplication(model.appId)
372+ ApplicationManager.stopApplication(model.appId)
366 ColumnLayout {
376 ColumnLayout {
@@ -519,6 +529,7 @@ Rectangle {
519 from: "*"
529 from: "*"
520 to: "altTab"
530 to: "altTab"
521 SequentialAnimation {
531 SequentialAnimation {
532+ PropertyAction { target: appRepeater; property: "highlightedIndex"; value: 1 }
522 PauseAnimation { duration: 50 }
533 PauseAnimation { duration: 50 }
523 PropertyAction { target: workspaceSelector; property: "visible" }
534 PropertyAction { target: workspaceSelector; property: "visible" }
524 ScriptAction { script: root.updateWorkspaces() }
535 ScriptAction { script: root.updateWorkspaces() }
@@ -526,9 +537,8 @@ Rectangle {
526 PauseAnimation { duration: 10 }
537 PauseAnimation { duration: 10 }
527 PropertyAction { target: root; property: "workspacesUpdated"; value: true }
538 PropertyAction { target: root; property: "workspacesUpdated"; value: true }
528 PropertyAction { target: spreadFlickable; property: "visible" }
539 PropertyAction { target: spreadFlickable; property: "visible" }
529− PropertyAction { target: currentSelectedLabel; property: "visible" }
540+ PropertyAction { targets: [currentSelectedLabel,spreadBackground]; property: "visible" }
530 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
541 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
531− PropertyAction { target: appRepeater; property: "highlightedIndex"; value: 1 }
534 Transition {
544 Transition {