Do not minimise windows from other screens

If a window from another screen is selected, don't minimise it.
Otherwise switching windows on the phone closes windows on the other
displays.
This commit is contained in:
Aleix Pol 2021-08-30 16:43:05 +02:00
parent 1da2432dec
commit d30744789f

View file

@ -76,12 +76,19 @@ NanoShell.FullScreenOverlay {
if (id < 0) {
return;
}
var newActiveIdx = window.model.index(id, 0)
var newActiveGeo = tasksModel.data(newActiveIdx, TaskManager.AbstractTasksModel.ScreenGeometry)
for (var i = 0 ; i < tasksModel.count; i++) {
var idx = window.model.index(i, 0)
if (i == id) {
window.model.requestActivate(idx);
} else if (!tasksModel.data(idx, TaskManager.AbstractTasksModel.IsMinimized)) {
tasksModel.requestToggleMinimized(idx);
var geo = tasksModel.data(idx, TaskManager.AbstractTasksModel.ScreenGeometry)
// Only minimize the other windows in the same screen
if (geo === newActiveGeo) {
tasksModel.requestToggleMinimized(idx);
}
}
}
activateAnim.delegate = delegate;