diff --git a/qml/main.qml b/qml/main.qml index 37ec653e0a231c47a6d227aca5fe44b5c8ae4b20..a89892656244043d09563fde37e26444712aeb3a 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -129,10 +129,16 @@ WaylandCompositor { } function handleIviSurfaceCreated(iviSurface) { - if (current_screen+1 > screens.count-1) - current_screen = 0; - else - current_screen++; - createIviSurfaceItem(iviSurface, screens.objectAt(current_screen)); + // We select the screen by evaluating the iviId of the app, + // if more than one screen is present. + // If the unique ivi id is greater or equal 2000 we select screen 2 + if (screens.count > 1) { + if (iviSurface.iviId > 1999) + createIviSurfaceItem(iviSurface, screens.objectAt(1)); + else + createIviSurfaceItem(iviSurface, screens.objectAt(0)); + } else { + createIviSurfaceItem(iviSurface, screens.objectAt(0)); + } } }