@@ -49,6 +49,11 @@ Rectangle {
49 shellLoader.active = true;
49 shellLoader.active = true;
53+ id: clickThroughCatcher
54+ anchors.fill: shellContainer
53 id: shellContainer
58 id: shellContainer
54 anchors.left: root.left
59 anchors.left: root.left
@@ -291,6 +296,12 @@ Rectangle {
291 signalName: "applicationRemoved"
296 signalName: "applicationRemoved"
301+ target: clickThroughCatcher
302+ signalName: "clicked"
294 Telephony.CallEntry {
305 Telephony.CallEntry {
295 id: phoneCall
306 id: phoneCall
296 phoneNumber: "+447812221111"
307 phoneNumber: "+447812221111"
@@ -1961,5 +1972,47 @@ Rectangle {
1961 compare(ApplicationManager.findApplication("libreoffice") === null, true);
1972 compare(ApplicationManager.findApplication("libreoffice") === null, true);
1976+ function test_inputEventsOnEdgesEndUpInAppSurface_data() {
1978+ { tag: "phone", repeaterName: "spreadRepeater" },
1979+ { tag: "tablet", repeaterName: "spreadRepeater" },
1980+ { tag: "desktop", repeaterName: "appRepeater" },
1984+ function test_inputEventsOnEdgesEndUpInAppSurface(data) {
1985+ loadShell(data.tag);
1986+ shell.usageScenario = data.tag;
1987+ waitForRendering(shell);
1988+ swipeAwayGreeter();
1990+ // Let's open a fullscreen app
1991+ var app = ApplicationManager.startApplication("camera-app");
1992+ waitUntilAppWindowIsFullyLoaded(app);
1994+ var appRepeater = findChild(shell, data.repeaterName);
1995+ var topmostAppDelegate = appRepeater.itemAt(0);
1996+ verify(topmostAppDelegate);
1998+ var topmostSurfaceItem = findChild(topmostAppDelegate, "surfaceItem");
1999+ verify(topmostSurfaceItem);
2001+ mouseClick(shell, 1, shell.height / 2);
2002+ compare(topmostSurfaceItem.mousePressCount, 1);
2003+ compare(topmostSurfaceItem.mouseReleaseCount, 1);
2005+ mouseClick(shell, shell.width - 1, shell.height / 2);
2006+ compare(topmostSurfaceItem.mousePressCount, 2);
2007+ compare(topmostSurfaceItem.mouseReleaseCount, 2);
2009+ tap(shell, 1, shell.height / 2);
2010+ compare(topmostSurfaceItem.touchPressCount, 1);
2011+ compare(topmostSurfaceItem.touchReleaseCount, 1);
2013+ tap(shell, shell.width - 1, shell.height / 2);
2014+ compare(topmostSurfaceItem.touchPressCount, 2);
2015+ compare(topmostSurfaceItem.touchReleaseCount, 2);