From 4b5c6ca3f506a3f1ce2dcf8e1d53f6f1014fac2f Mon Sep 17 00:00:00 2001 From: Yari Polla Date: Sun, 12 Mar 2023 21:35:02 +0100 Subject: [PATCH] homescreens/halcyon: fix plasmoid activation --- .../halcyon/package/contents/ui/main.qml | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/containments/homescreens/halcyon/package/contents/ui/main.qml b/containments/homescreens/halcyon/package/contents/ui/main.qml index 32928578..f1eab767 100644 --- a/containments/homescreens/halcyon/package/contents/ui/main.qml +++ b/containments/homescreens/halcyon/package/contents/ui/main.qml @@ -40,30 +40,26 @@ MobileShell.HomeScreen { } } - Plasmoid.onActivated: { + Plasmoid.onActivated: { // there's a couple of steps: // - minimize windows (only if we are in an app) // - open app drawer // - close app drawer and, if necessary, restore windows - if (!plasmoid.nativeInterface.showingDesktop && !MobileShellState.Shell.homeScreenVisible - || MobileShellState.Shell.actionDrawerVisible + if (!MobileShell.WindowUtil.showDesktop && !MobileShellState.Shell.homeScreenVisible || search.isOpen ) { - // Always close action drawer - if (MobileShellState.Shell.actionDrawerVisible) { - MobileShellState.Shell.closeActionDrawer(); - } - - // Always close the search widget as well + // Always close the search widget if (search.isOpen) { search.close(); } - - plasmoid.nativeInterface.showingDesktop = true; + + homescreen.page = 0; + + MobileShell.WindowUtil.showDesktop = true; } else if (homescreen.page == 0) { homescreen.page = 1; } else { - plasmoid.nativeInterface.showingDesktop = false; + MobileShell.WindowUtil.showDesktop = false; homescreen.page = 0; } }