on xenial help sign in
fix binding loop when cascading windows
7321eb1Michael Zanetti
qml/Stage/Stage.qml+10−7
@@ -581,11 +581,16 @@ AbstractStage {
581
581
582 // In those are for windowed mode. Those values basically store the window's properties
582 // In those are for windowed mode. Those values basically store the window's properties
583 // when having a floating window. If you want to move/resize a window in normal mode, this is what you want to write to.
583 // when having a floating window. If you want to move/resize a window in normal mode, this is what you want to write to.
584− property real windowedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
584+ property real windowedX
585− property real windowedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
585+ property real windowedY
586 property real windowedWidth
586 property real windowedWidth
587 property real windowedHeight
587 property real windowedHeight
588
588
589+ // unlike windowedX/Y, this is the last known grab position before being pushed against edges/corners
590+ // when restoring, the window should return to these, not to the place where it was dropped near the edge
591+ property real restoredX
592+ property real restoredY
593+
589 Binding {
594 Binding {
590 target: appDelegate
595 target: appDelegate
591 property: "y"
596 property: "y"
@@ -736,6 +741,9 @@ AbstractStage {
736 decoratedWindow.surfaceOrientationAngle = 0;
741 decoratedWindow.surfaceOrientationAngle = 0;
737 }
742 }
738
743
744+ windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
745+ windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
746+
739 // NB: We're differentiating if this delegate was created in response to a new entry in the model
747 // NB: We're differentiating if this delegate was created in response to a new entry in the model
740 // or if the Repeater is just populating itself with delegates to match the model it received.
748 // or if the Repeater is just populating itself with delegates to match the model it received.
741 if (!appRepeater.startingUp) {
749 if (!appRepeater.startingUp) {
@@ -969,11 +977,6 @@ AbstractStage {
969 breakPoint: spreadItem.rightEdgeBreakPoint
977 breakPoint: spreadItem.rightEdgeBreakPoint
970 }
978 }
971
979
972− // unlike requestedX/Y, this is the last known grab position before being pushed against edges/corners
973− // when restoring, the window should return to these, not to the place where it was dropped near the edge
974− property real restoredX
975− property real restoredY
976−
977 states: [
980 states: [
978 State {
981 State {
979 name: "spread"; when: root.state == "spread"
982 name: "spread"; when: root.state == "spread"