@@ -17,36 +17,33 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import Unity.Application 0.1
18import Unity.Application 0.1
21 property bool active: true
21 property bool active: true
22 property QtObject application: null
22 property QtObject application: null
26− property var lastSurface: application && application.session ?
24+ readonly property var lastSurface: application && application.session ?
27− application.session.lastSurface : null
25+ application.session.lastSurface : null
28− onLastSurfaceChanged: {
26+ onLastSurfaceChanged: {
29− if (!active || !lastSurface) return;
27+ if (!active || !lastSurface) return;
30− if (lastSurface.shellChrome === Mir.LowChrome) {
28+ if (lastSurface.shellChrome === Mir.LowChrome) {
31− lastSurface.state = Mir.FullscreenState;
29+ lastSurface.state = Mir.FullscreenState;
36− Connections {
33+ property var _connections: Connections {
37− target: priv.lastSurface
34+ target: lastSurface
38 onShellChromeChanged: {
35 onShellChromeChanged: {
39− if (!active || !priv.lastSurface) return;
36+ if (!active || !lastSurface) return;
40− if (priv.lastSurface.shellChrome === Mir.LowChrome) {
37+ if (lastSurface.shellChrome === Mir.LowChrome) {
41− priv.lastSurface.state = Mir.FullscreenState;
38+ lastSurface.state = Mir.FullscreenState;
43− priv.lastSurface.state = Mir.RestoredState;
40+ lastSurface.state = Mir.RestoredState;
46 onStateChanged: {
43 onStateChanged: {
47 if (!active) return;
44 if (!active) return;
48− if (priv.lastSurface.state === Mir.RestoredState && priv.lastSurface.shellChrome === Mir.LowChrome) {
45+ if (lastSurface.state === Mir.RestoredState && lastSurface.shellChrome === Mir.LowChrome) {
49− priv.lastSurface.state = Mir.FullscreenState;
46+ lastSurface.state = Mir.FullscreenState;