Add agl-shell-desktop protocol
[apps/onscreenapp.git] / sample / app / main.qml
index b9f415b..4d23921 100644 (file)
@@ -7,8 +7,8 @@ import AGL.Demo.Controls 1.0
 ApplicationWindow {
     id: root
     visible: true
-    width: 1080
-    height: 1487
+    width: Screen.width
+    height: Screen.height
 
     property string onsId: qsTr("onscreenapp")
     property string onsTitle: qsTr("One Button title")
@@ -339,7 +339,13 @@ ApplicationWindow {
         else
             postmsg += "}"
 
-        eventHandler.showWindow(onsId, 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)
     }
 
     function qmlOnReplyShowWindow(text) {