diff --git a/components/mobileshell/qml/homescreen/HomeScreen.qml b/components/mobileshell/qml/homescreen/HomeScreen.qml index 6cc4ab08..6b23d138 100644 --- a/components/mobileshell/qml/homescreen/HomeScreen.qml +++ b/components/mobileshell/qml/homescreen/HomeScreen.qml @@ -102,6 +102,35 @@ Item { } } + TaskManager.VirtualDesktopInfo { + id: virtualDesktopInfo + } + + TaskManager.ActivityInfo { + id: activityInfo + } + + PlasmaCore.SortFilterModel { + id: visibleMaximizedWindowsModel + readonly property bool isWindowMaximized: count > 0 + + filterRole: 'IsMinimized' + filterRegExp: 'false' + sourceModel: TaskManager.TasksModel { + id: tasksModel + filterByVirtualDesktop: true + filterByActivity: true + filterNotMaximized: true + filterByScreen: true + filterHidden: true + + virtualDesktop: virtualDesktopInfo.currentDesktop + activity: activityInfo.currentActivity + + groupMode: TaskManager.TasksModel.GroupDisabled + } + } + // homescreen visual component MobileShell.BaseItem { id: itemContainer @@ -142,18 +171,28 @@ Item { easing.type: Easing.OutExpo } + function evaluateAnimChange() { + // only animate if homescreen is visible + if (!taskSwitcher.visible) { + if (!visibleMaximizedWindowsModel.isWindowMaximized || MobileShell.WindowUtil.activeWindowIsShell) { + itemContainer.zoomIn(); + } else { + itemContainer.zoomOut(); + } + } + } + Connections { target: MobileShell.WindowUtil - function onActiveWindowIsShellChanged() { - // only animate if homescreen is visible - if (!taskSwitcher.visible) { - if (MobileShell.WindowUtil.activeWindowIsShell) { - itemContainer.zoomIn(); - } else { - itemContainer.zoomOut(); - } - } + itemContainer.evaluateAnimChange(); + } + } + + Connections { + target: visibleMaximizedWindowsModel + function onIsWindowMaximizedChanged() { + itemContainer.evaluateAnimChange(); } } @@ -179,14 +218,6 @@ Item { virtualDesktop: virtualDesktopInfo.currentDesktop activity: activityInfo.currentActivity } - - TaskManager.VirtualDesktopInfo { - id: virtualDesktopInfo - } - - TaskManager.ActivityInfo { - id: activityInfo - } anchors.fill: parent diff --git a/containments/taskpanel/package/contents/ui/main.qml b/containments/taskpanel/package/contents/ui/main.qml index 0b1b3d3a..4b9f588c 100644 --- a/containments/taskpanel/package/contents/ui/main.qml +++ b/containments/taskpanel/package/contents/ui/main.qml @@ -128,7 +128,6 @@ PlasmaCore.ColorScope { filterByScreen: true filterHidden: true -// screenGeometry: panel.screenGeometry virtualDesktop: virtualDesktopInfo.currentDesktop activity: activityInfo.currentActivity