@@ -414,7 +414,7 @@ Rectangle {
414 // Open an application and focus
414 // Open an application and focus
415 waitUntilApplicationWindowIsFullyVisible(app);
415 waitUntilApplicationWindowIsFullyVisible(app);
416 ApplicationManager.focusApplication(app);
416 ApplicationManager.focusApplication(app);
417− tryCompare(app.session.surface, "activeFocus", true);
417+ tryCompare(app.session.lastSurface, "activeFocus", true);
419 notifications.model = mockNotificationsModel;
419 notifications.model = mockNotificationsModel;
@@ -436,7 +436,7 @@ Rectangle {
436 waitForRendering(notification);
436 waitForRendering(notification);
438 // Make sure activeFocus went away from the app window
438 // Make sure activeFocus went away from the app window
439− tryCompare(app.session.surface, "activeFocus", false);
439+ tryCompare(app.session.lastSurface, "activeFocus", false);
440 tryCompare(stage, "interactive", false);
440 tryCompare(stage, "interactive", false);
442 // Clicking the button should dismiss the notification and return focus
442 // Clicking the button should dismiss the notification and return focus
@@ -444,7 +444,7 @@ Rectangle {
444 mouseClick(buttonAccept);
444 mouseClick(buttonAccept);
446 // Make sure we're back to normal
446 // Make sure we're back to normal
447− tryCompare(app.session.surface, "activeFocus", true);
447+ tryCompare(app.session.lastSurface, "activeFocus", true);
448 compare(stage.interactive, true, "Stages not interactive again after modal notification has closed");
448 compare(stage.interactive, true, "Stages not interactive again after modal notification has closed");
@@ -776,7 +776,7 @@ Rectangle {
776 var app = ApplicationManager.startApplication("dialer-app");
776 var app = ApplicationManager.startApplication("dialer-app");
777 waitUntilAppWindowIsFullyLoaded(app);
777 waitUntilAppWindowIsFullyLoaded(app);
779− tryCompare(app.session.surface, "activeFocus", true);
779+ tryCompare(app.session.lastSurface, "activeFocus", true);
781 // Drag the indicators panel half-open
781 // Drag the indicators panel half-open
782 var touchX = shell.width / 2;
782 var touchX = shell.width / 2;
@@ -787,7 +787,7 @@ Rectangle {
787 true /* beginTouch */, false /* endTouch */);
787 true /* beginTouch */, false /* endTouch */);
788 verify(indicators.partiallyOpened);
788 verify(indicators.partiallyOpened);
790− tryCompare(app.session.surface, "activeFocus", false);
790+ tryCompare(app.session.lastSurface, "activeFocus", false);
792 // And finish getting it open
792 // And finish getting it open
793 touchFlick(indicators,
793 touchFlick(indicators,
@@ -796,11 +796,11 @@ Rectangle {
796 false /* beginTouch */, true /* endTouch */);
796 false /* beginTouch */, true /* endTouch */);
797 tryCompare(indicators, "fullyOpened", true);
797 tryCompare(indicators, "fullyOpened", true);
799− tryCompare(app.session.surface, "activeFocus", false);
799+ tryCompare(app.session.lastSurface, "activeFocus", false);
801 dragToCloseIndicatorsPanel();
801 dragToCloseIndicatorsPanel();
803− tryCompare(app.session.surface, "activeFocus", true);
803+ tryCompare(app.session.lastSurface, "activeFocus", true);
806 function test_launchedAppHasActiveFocus_data() {
806 function test_launchedAppHasActiveFocus_data() {
@@ -821,9 +821,9 @@ Rectangle {
821 verify(webApp);
821 verify(webApp);
822 waitUntilAppSurfaceShowsUp("webbrowser-app")
822 waitUntilAppSurfaceShowsUp("webbrowser-app")
824− verify(webApp.session.surface);
824+ verify(webApp.session.lastSurface);
826− tryCompare(webApp.session.surface, "activeFocus", true);
826+ tryCompare(webApp.session.lastSurface, "activeFocus", true);
829 function test_launchedAppKeepsActiveFocusOnUsageModeChange() {
829 function test_launchedAppKeepsActiveFocusOnUsageModeChange() {
@@ -834,9 +834,9 @@ Rectangle {
834 verify(webApp);
834 verify(webApp);
835 waitUntilAppSurfaceShowsUp("webbrowser-app")
835 waitUntilAppSurfaceShowsUp("webbrowser-app")
837− verify(webApp.session.surface);
837+ verify(webApp.session.lastSurface);
839− tryCompare(webApp.session.surface, "activeFocus", true);
839+ tryCompare(webApp.session.lastSurface, "activeFocus", true);
841 shell.usageScenario = "desktop";
841 shell.usageScenario = "desktop";
@@ -846,7 +846,7 @@ Rectangle {
846 verify(desktopWindow);
846 verify(desktopWindow);
849− tryCompare(webApp.session.surface, "activeFocus", true);
849+ tryCompare(webApp.session.lastSurface, "activeFocus", true);
851 shell.usageScenario = "tablet";
851 shell.usageScenario = "tablet";
@@ -856,7 +856,7 @@ Rectangle {
856 verify(desktopWindow);
856 verify(desktopWindow);
859− tryCompare(webApp.session.surface, "activeFocus", true);
859+ tryCompare(webApp.session.lastSurface, "activeFocus", true);
862 function waitUntilAppSurfaceShowsUp(appId) {
862 function waitUntilAppSurfaceShowsUp(appId) {
@@ -977,7 +977,7 @@ Rectangle {
978 var app = ApplicationManager.startApplication("dialer-app");
978 var app = ApplicationManager.startApplication("dialer-app");
979 // wait until the app is fully loaded (ie, real surface replaces splash screen)
979 // wait until the app is fully loaded (ie, real surface replaces splash screen)
980− tryCompareFunction(function() { return app.session !== null && app.session.surface !== null }, true);
980+ tryCompareFunction(function() { return app.session !== null && app.session.lastSurface !== null }, true);
982 // Minimize the application we just launched
982 // Minimize the application we just launched
983 swipeFromLeftEdge(shell.width * 0.75);
983 swipeFromLeftEdge(shell.width * 0.75);
@@ -1414,9 +1414,9 @@ Rectangle {
1414 waitUntilAppWindowIsFullyLoaded(app3);
1414 waitUntilAppWindowIsFullyLoaded(app3);
1416 // Do a quick alt-tab and see if focus changes
1416 // Do a quick alt-tab and see if focus changes
1417− tryCompare(app3.session.surface, "activeFocus", true)
1417+ tryCompare(app3.session.lastSurface, "activeFocus", true)
1418 keyClick(Qt.Key_Tab, Qt.ControlModifier)
1418 keyClick(Qt.Key_Tab, Qt.ControlModifier)
1419− tryCompare(app2.session.surface, "activeFocus", true)
1419+ tryCompare(app2.session.lastSurface, "activeFocus", true)
1421 var desktopSpread = findChild(shell, "spread")
1421 var desktopSpread = findChild(shell, "spread")
@@ -1432,7 +1432,7 @@ Rectangle {
1432 tryCompare(desktopSpread, "state", "")
1432 tryCompare(desktopSpread, "state", "")
1434 // Focus should have switched back now
1434 // Focus should have switched back now
1435− tryCompare(app3.session.surface, "activeFocus", true)
1435+ tryCompare(app3.session.lastSurface, "activeFocus", true)
1438 function test_altTabWrapAround() {
1438 function test_altTabWrapAround() {
@@ -1481,7 +1481,7 @@ Rectangle {
1481 tryCompare(desktopSpread, "state", "")
1481 tryCompare(desktopSpread, "state", "")
1483 // Make sure that after wrapping around once, we have the same one focused as at the beginning
1483 // Make sure that after wrapping around once, we have the same one focused as at the beginning
1484− tryCompare(focused.session.surface, "activeFocus", true)
1484+ tryCompare(focused.session.lastSurface, "activeFocus", true)
1487 function test_altBackTabNavigation() {
1487 function test_altBackTabNavigation() {
@@ -1863,7 +1863,7 @@ Rectangle {
1863 waitUntilAppWindowIsFullyLoaded(app2);
1863 waitUntilAppWindowIsFullyLoaded(app2);
1865 // Make sure app1 is unfocused but still running
1865 // Make sure app1 is unfocused but still running
1866− compare(app1.session.surface.activeFocus, false);
1866+ compare(app1.session.lastSurface.activeFocus, false);
1867 compare(app1.isTouchApp, false); // sanity check our mock, which sets this for us
1867 compare(app1.isTouchApp, false); // sanity check our mock, which sets this for us
1868 compare(app1.requestedState, ApplicationInfoInterface.RequestedRunning);
1868 compare(app1.requestedState, ApplicationInfoInterface.RequestedRunning);
@@ -1887,7 +1887,7 @@ Rectangle {
1887 waitUntilAppWindowIsFullyLoaded(app2);
1887 waitUntilAppWindowIsFullyLoaded(app2);
1889 // Make sure app1 is unfocused but still running
1889 // Make sure app1 is unfocused but still running
1890− compare(app1.session.surface.activeFocus, false);
1890+ compare(app1.session.lastSurface.activeFocus, false);
1891 compare(app1.requestedState, ApplicationInfoInterface.RequestedRunning);
1891 compare(app1.requestedState, ApplicationInfoInterface.RequestedRunning);