X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=sample%2Fapp%2Fmain.qml;fp=sample%2Fapp%2Fmain.qml;h=f0a65e99d94df38ad277ef515d6724b3d8534bfd;hb=cd39ff2c9987904617c53685a75f5fe89513ce81;hp=4d23921d63cc336c041aed1e6d5129173e88baac;hpb=85a1f5f0305fda98d7077bab78070456bcd680ac;p=apps%2Fonscreenapp.git diff --git a/sample/app/main.qml b/sample/app/main.qml index 4d23921..f0a65e9 100644 --- a/sample/app/main.qml +++ b/sample/app/main.qml @@ -19,6 +19,7 @@ ApplicationWindow { property string onsButton3: qsTr("") property string postmsg: qsTr("") property string btndata: qsTr("") + property int pid: -1 Label { id: title @@ -340,12 +341,14 @@ ApplicationWindow { postmsg += "}" // if the application is not already started, start it - // if the application is not started, the first time we start - // it will by shown by default - eventHandler.start(onsId, postmsg) - - // we just need to display - eventHandler.showWindow(onsId, postmsg) + if (pid == -1) { + // if the application is not started, then the first time + // we start we also display it using the default policy engine + pid = eventHandler.start(onsId, postmsg) + } else { + // we just need to display it + eventHandler.showWindow(onsId, postmsg) + } } function qmlOnReplyShowWindow(text) {