@@ -25,6 +25,7 @@ import GlobalShortcut 1.0
25import GSettings 1.0
25import GSettings 1.0
26import "Spread"
26import "Spread"
27import "Spread/MathUtils.js" as MathUtils
27import "Spread/MathUtils.js" as MathUtils
28+import WindowManager 1.0
29FocusScope {
30FocusScope {
@@ -49,6 +50,8 @@ FocusScope {
49 property real rightEdgePushProgress: 0
50 property real rightEdgePushProgress: 0
50 property PanelState panelState
51 property PanelState panelState
53+ readonly property var temporarySelectedWorkspace: state == "spread" ? screensAndWorkspaces.lastClickedWorkspace : null
52 // Configuration
55 // Configuration
53 property string mode: "staged"
56 property string mode: "staged"
@@ -522,11 +525,15 @@ FocusScope {
522 Transition {
525 Transition {
523 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
526 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
524 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
527 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
528+ PropertyAction { target: screensAndWorkspaces; property: "activeWorkspace"; value: WMScreen.currentWorkspace }
529+ ScriptAction { script: { print("blabal***********************", WMScreen.currentWorkspace) } }
525 PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
530 PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
526 UbuntuNumberAnimation { target: screensAndWorkspaces; property: "opacity"; duration: priv.animationDuration }
531 UbuntuNumberAnimation { target: screensAndWorkspaces; property: "opacity"; duration: priv.animationDuration }
528 Transition {
533 Transition {
529 to: "spread"
534 to: "spread"
535+ PropertyAction { target: screensAndWorkspaces; property: "activeWorkspace"; value: WMScreen.currentWorkspace }
536+ ScriptAction { script: { print("blabal***********************", WMScreen.currentWorkspace) } }
530 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: appRepeater.count > 1 ? 1 : 0 }
537 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: appRepeater.count > 1 ? 1 : 0 }
531 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
538 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
532 UbuntuNumberAnimation { target: screensAndWorkspaces; property: "opacity"; duration: priv.animationDuration }
539 UbuntuNumberAnimation { target: screensAndWorkspaces; property: "opacity"; duration: priv.animationDuration }
@@ -545,6 +552,7 @@ FocusScope {
546 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
553 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
547 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
554 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
555+ PropertyAction { target: screensAndWorkspaces; property: "lastClickedWorkspace"; value: null }
550 Transition {
558 Transition {
@@ -594,8 +602,8 @@ FocusScope {
594 background: root.background
602 background: root.background
595 opacity: 0
603 opacity: 0
596 visible: opacity > 0
604 visible: opacity > 0
598 onCloseSpread: priv.goneToSpread = false;
605 onCloseSpread: priv.goneToSpread = false;
606+ onLastClickedWorkspaceChanged: activeWorkspace = lastClickedWorkspace