Commit f99c1879 authored by eekkelund's avatar eekkelund

[AppLauncher] Fix same application launching many times

parent a12bf787
......@@ -56,7 +56,7 @@ MouseArea {
// TODO: disallow if close mode enabled
if (modelData.object.type !== LauncherModel.Folder) {
var winId = switcher.switchModel.getWindowIdForTitle(modelData.object.title)
if (winId == 0 || !modelData.object.isLaunching)
if (winId == 0 && !modelData.object.isLaunching)
modelData.object.launchApplication()
else
Lipstick.compositor.windowToFront(winId)
......
......@@ -458,13 +458,13 @@ Item {
var winId
if (searchLauncherModel.get(model.id).type !== LauncherModel.Folder) {
winId = switcher.switchModel.getWindowIdForTitle(model.title)
if (winId == 0 || !searchLauncherModel.get(model.id).isLaunching)
if (winId == 0 && !searchLauncherModel.get(model.id).isLaunching)
searchLauncherModel.get(model.id).launchApplication()
else
Lipstick.compositor.windowToFront(winId)
} else if (searchLauncherModel.get(model.id).type === LauncherModel.Folder && model.folderId > -1) {
winId = switcher.switchModel.getWindowIdForTitle(model.title)
if (winId == 0 || !searchLauncherModel.get(model.id).get(model.folderId).isLaunching)
if (winId == 0 && !searchLauncherModel.get(model.id).get(model.folderId).isLaunching)
searchLauncherModel.get(model.id).get(model.folderId).launchApplication()
else
Lipstick.compositor.windowToFront(winId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment