on xenial help sign in
update surface state
cf7a5e9Nick Dedekind
qml/Stages/PhoneStage.qml+7−10
@@ -587,20 +587,17 @@ AbstractStage {
587 value: orientationChangesEnabled
587 value: orientationChangesEnabled
588 }
588 }
589
589
590− property bool firstTimeSurface: true
591 property var lastSurface: application && application.session ?
590 property var lastSurface: application && application.session ?
592 application.session.lastSurface : null
591 application.session.lastSurface : null
593− onLastSurfaceChanged: {
592+ Binding {
594− if (!lastSurface) return;
593+ target: lastSurface
595− if (!firstTimeSurface) return;
594+ when: lastSurface
596− firstTimeSurface = false;
595+ property: "state"
597−
596+ value: {
598− if (lastSurface.state !== Mir.FullscreenState &&
599− lastSurface.shellChrome === Mir.LowChrome) {
597+ lastSurface.shellChrome === Mir.LowChrome ? Mir.FullscreenState : Mir.RestoredState
600− lastSurface.state = Mir.FullscreenState;
601 }
598 }
602 }
599 }
603− fullscreen: lastSurface ? lastSurface.shellChrome === Mir.LowChrome : false
600+ fullscreen: application.fullscreen
604 }
601 }
605 }
602 }
606 }
603 }
qml/Stages/TabletStage.qml+7−10
@@ -750,20 +750,17 @@ AbstractStage {
750 progress: spreadTile.progress - spreadView.positionMarker1
750 progress: spreadTile.progress - spreadView.positionMarker1
751 }
751 }
752
752
753− property bool firstTimeSurface: true
754 property var lastSurface: application && application.session ?
753 property var lastSurface: application && application.session ?
755 application.session.lastSurface : null
754 application.session.lastSurface : null
756− onLastSurfaceChanged: {
755+ Binding {
757− if (!lastSurface) return;
756+ target: lastSurface
758− if (!firstTimeSurface) return;
757+ when: lastSurface
759− firstTimeSurface = false;
758+ property: "state"
760−
759+ value: {
761− if (lastSurface.state !== Mir.FullscreenState &&
762− lastSurface.shellChrome === Mir.LowChrome) {
760+ lastSurface.shellChrome === Mir.LowChrome ? Mir.FullscreenState : Mir.RestoredState
763− lastSurface.state = Mir.FullscreenState;
764 }
761 }
765 }
762 }
766− fullscreen: lastSurface ? lastSurface.shellChrome === Mir.LowChrome : false
763+ fullscreen: application.fullscreen
767 }
764 }
768 }
765 }
769 }
766 }
qml/Stages/WindowResizeArea.qml−1
@@ -40,7 +40,6 @@ MouseArea {
40 property int defaultHeight: units.gu(50)
40 property int defaultHeight: units.gu(50)
41 property int screenWidth: 0
41 property int screenWidth: 0
42 property int screenHeight: 0
42 property int screenHeight: 0
43− property bool saveStateOnDestruction: true
44
43
45 QtObject {
44 QtObject {
46 id: priv
45 id: priv