mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
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:
parent
1da2432dec
commit
d30744789f
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue