on xenial help sign in
update surface state
commitcf7a5e9d7a2878275f82809bda7f7406ee6c791c authorNick Dedekind <nick.dedekind@canonical.com> dateWed 17 Feb 2016, 11:37 (11 years ago) parent3ef0af1
3 files changed+14−21
qml/Stages/PhoneStage.qml+7−10 qml/Stages/TabletStage.qml+7−10 qml/Stages/WindowResizeArea.qml−1
qml/Stages/PhoneStage.qml+7−10
@@ -587,20 +587,17 @@ AbstractStage {
587587 value: orientationChangesEnabled
588588 }
589589
590− property bool firstTimeSurface: true
591590 property var lastSurface: application && application.session ?
592591 application.session.lastSurface : null
593− onLastSurfaceChanged: {
594− if (!lastSurface) return;
595− if (!firstTimeSurface) return;
596− firstTimeSurface = false;
597−
598− if (lastSurface.state !== Mir.FullscreenState &&
599− lastSurface.shellChrome === Mir.LowChrome) {
600− lastSurface.state = Mir.FullscreenState;
592+ Binding {
593+ target: lastSurface
594+ when: lastSurface
595+ property: "state"
596+ value: {
597+ lastSurface.shellChrome === Mir.LowChrome ? Mir.FullscreenState : Mir.RestoredState
601598 }
602599 }
603− fullscreen: lastSurface ? lastSurface.shellChrome === Mir.LowChrome : false
600+ fullscreen: application.fullscreen
604601 }
605602 }
606603 }
qml/Stages/TabletStage.qml+7−10
@@ -750,20 +750,17 @@ AbstractStage {
750750 progress: spreadTile.progress - spreadView.positionMarker1
751751 }
752752
753− property bool firstTimeSurface: true
754753 property var lastSurface: application && application.session ?
755754 application.session.lastSurface : null
756− onLastSurfaceChanged: {
757− if (!lastSurface) return;
758− if (!firstTimeSurface) return;
759− firstTimeSurface = false;
760−
761− if (lastSurface.state !== Mir.FullscreenState &&
762− lastSurface.shellChrome === Mir.LowChrome) {
763− lastSurface.state = Mir.FullscreenState;
755+ Binding {
756+ target: lastSurface
757+ when: lastSurface
758+ property: "state"
759+ value: {
760+ lastSurface.shellChrome === Mir.LowChrome ? Mir.FullscreenState : Mir.RestoredState
764761 }
765762 }
766− fullscreen: lastSurface ? lastSurface.shellChrome === Mir.LowChrome : false
763+ fullscreen: application.fullscreen
767764 }
768765 }
769766 }
qml/Stages/WindowResizeArea.qml−1
@@ -40,7 +40,6 @@ MouseArea {
4040 property int defaultHeight: units.gu(50)
4141 property int screenWidth: 0
4242 property int screenHeight: 0
43− property bool saveStateOnDestruction: true
4443
4544 QtObject {
4645 id: priv