@@ -49,6 +49,11 @@ Rectangle {
4949 shellLoader.active = true;
5050 }
5151
52+ MouseArea {
53+ id: clickThroughCatcher
54+ anchors.fill: shellContainer
55+ }
56+
5257 Item {
5358 id: shellContainer
5459 anchors.left: root.left
@@ -291,6 +296,12 @@ Rectangle {
291296 signalName: "applicationRemoved"
292297 }
293298
299+ SignalSpy {
300+ id: clickThroughSpy
301+ target: clickThroughCatcher
302+ signalName: "clicked"
303+ }
304+
294305 Telephony.CallEntry {
295306 id: phoneCall
296307 phoneNumber: "+447812221111"
@@ -1961,5 +1972,47 @@ Rectangle {
19611972 compare(ApplicationManager.findApplication("libreoffice") === null, true);
19621973 }
19631974 }
1975+
1976+ function test_inputEventsOnEdgesEndUpInAppSurface_data() {
1977+ return [
1978+ { tag: "phone", repeaterName: "spreadRepeater" },
1979+ { tag: "tablet", repeaterName: "spreadRepeater" },
1980+ { tag: "desktop", repeaterName: "appRepeater" },
1981+ ]
1982+ }
1983+
1984+ function test_inputEventsOnEdgesEndUpInAppSurface(data) {
1985+ loadShell(data.tag);
1986+ shell.usageScenario = data.tag;
1987+ waitForRendering(shell);
1988+ swipeAwayGreeter();
1989+
1990+ // Let's open a fullscreen app
1991+ var app = ApplicationManager.startApplication("camera-app");
1992+ waitUntilAppWindowIsFullyLoaded(app);
1993+
1994+ var appRepeater = findChild(shell, data.repeaterName);
1995+ var topmostAppDelegate = appRepeater.itemAt(0);
1996+ verify(topmostAppDelegate);
1997+
1998+ var topmostSurfaceItem = findChild(topmostAppDelegate, "surfaceItem");
1999+ verify(topmostSurfaceItem);
2000+
2001+ mouseClick(shell, 1, shell.height / 2);
2002+ compare(topmostSurfaceItem.mousePressCount, 1);
2003+ compare(topmostSurfaceItem.mouseReleaseCount, 1);
2004+
2005+ mouseClick(shell, shell.width - 1, shell.height / 2);
2006+ compare(topmostSurfaceItem.mousePressCount, 2);
2007+ compare(topmostSurfaceItem.mouseReleaseCount, 2);
2008+
2009+ tap(shell, 1, shell.height / 2);
2010+ compare(topmostSurfaceItem.touchPressCount, 1);
2011+ compare(topmostSurfaceItem.touchReleaseCount, 1);
2012+
2013+ tap(shell, shell.width - 1, shell.height / 2);
2014+ compare(topmostSurfaceItem.touchPressCount, 2);
2015+ compare(topmostSurfaceItem.touchReleaseCount, 2);
2016+ }
19642017 }
19652018}