@@ -17,36 +17,33 @@
1717import QtQuick 2.4
1818import Unity.Application 0.1
1919
20−Item {
20+QtObject {
2121 property bool active: true
2222 property QtObject application: null
2323
24− QtObject {
25− id: priv
26− property var lastSurface: application && application.session ?
27− application.session.lastSurface : null
28− onLastSurfaceChanged: {
29− if (!active || !lastSurface) return;
30− if (lastSurface.shellChrome === Mir.LowChrome) {
31− lastSurface.state = Mir.FullscreenState;
32− }
24+ readonly property var lastSurface: application && application.session ?
25+ application.session.lastSurface : null
26+ onLastSurfaceChanged: {
27+ if (!active || !lastSurface) return;
28+ if (lastSurface.shellChrome === Mir.LowChrome) {
29+ lastSurface.state = Mir.FullscreenState;
3330 }
3431 }
3532
36− Connections {
37− target: priv.lastSurface
33+ property var _connections: Connections {
34+ target: lastSurface
3835 onShellChromeChanged: {
39− if (!active || !priv.lastSurface) return;
40− if (priv.lastSurface.shellChrome === Mir.LowChrome) {
41− priv.lastSurface.state = Mir.FullscreenState;
36+ if (!active || !lastSurface) return;
37+ if (lastSurface.shellChrome === Mir.LowChrome) {
38+ lastSurface.state = Mir.FullscreenState;
4239 } else {
43− priv.lastSurface.state = Mir.RestoredState;
40+ lastSurface.state = Mir.RestoredState;
4441 }
4542 }
4643 onStateChanged: {
4744 if (!active) return;
48− if (priv.lastSurface.state === Mir.RestoredState && priv.lastSurface.shellChrome === Mir.LowChrome) {
49− priv.lastSurface.state = Mir.FullscreenState;
45+ if (lastSurface.state === Mir.RestoredState && lastSurface.shellChrome === Mir.LowChrome) {
46+ lastSurface.state = Mir.FullscreenState;
5047 }
5148 }
5249 }