- applicationArea.visible = true
- appLauncherAreaLauncher.visible = false
- layoutHandler.showAppLayer(pid)
- }
- else {
- console.warn("app cannot be launched!")
+ MouseArea {
+ id: loc
+ anchors.fill: parent
+ property string currentId: ''
+ property int newIndex: -1
+ property int index: grid.indexAt(loc.mouseX, loc.mouseY)
+ onPressAndHold: currentId = applicationModel.id(newIndex = index)
+ onReleased: {
+ if (currentId === '') {
+ pid = launcher.launch(applicationModel.id(loc.index))
+ if (1 < pid) {
+ layoutHandler.makeMeVisible(pid)
+
+ applicationArea.visible = true
+ appLauncherAreaLauncher.visible = false
+ layoutHandler.showAppLayer(pid)
+ }
+ else {
+ console.warn("app cannot be launched!")
+ }
+ } else {
+ currentId = ''