From bfbac0b1f78962e19ceac8356a6c0c77ccce795b Mon Sep 17 00:00:00 2001 From: Naoto Yamaguchi Date: Sat, 12 Oct 2024 20:15:03 +0900 Subject: Enable automatic default screen change Exist momiscreen show background screen after booting. This patch enable automatic change screen to default app in case of default app launched. Bug-AGL: SPEC-5162 Change-Id: I0a1bc0286ab893442ca8ea5a2c7249c95ad664ce Signed-off-by: Naoto Yamaguchi --- main.qml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/main.qml b/main.qml index dde3849..8014f3c 100644 --- a/main.qml +++ b/main.qml @@ -17,7 +17,6 @@ WaylandCompositor { width: 1920 height: 1080 color: "#004f00" - //flags: Qt.FramelessWindowHint visible: true Image { id: backgroundAGL @@ -305,6 +304,8 @@ WaylandCompositor { } IviApplication { + property int defaultAppIviSurfaceIDpathcounter : 2010 + onIviSurfaceCreated: (iviSurface) => { var surfaceArea; var validValue = true; @@ -328,6 +329,23 @@ WaylandCompositor { z: 10 } ); } + + if (iviSurface.iviId === defaultAppIviSurfaceIDpathcounter) { + if (defaultAppIviSurfaceIDpathcounter === 2010) { + mainScreenWindow.hideAppList(); + appLayer2010.showApp(); + } else if (defaultAppIviSurfaceIDpathcounter === 2011) { + mainScreenWindow.hideAppList(); + appLayer2011.showApp(); + } else if (defaultAppIviSurfaceIDpathcounter === 2012) { + mainScreenWindow.hideAppList(); + appLayer2012.showApp(); + } else if (defaultAppIviSurfaceIDpathcounter === 2013) { + mainScreenWindow.hideAppList(); + appLayer2013.showApp(); + } + + } } } } -- cgit 1.2.3-korg