mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
homescreens/folio: Fix start button behaviour, ensure windows are minimized and it's not triggered in docked mode
BUG: 482870
This commit is contained in:
parent
85061c3d9f
commit
d2f63e6d9a
1 changed files with 16 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ import org.kde.plasma.private.mobileshell as MobileShell
|
|||
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||
import org.kde.private.mobile.homescreen.folio 1.0 as Folio
|
||||
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||
|
||||
ContainmentItem {
|
||||
id: root
|
||||
|
|
@ -74,12 +75,22 @@ ContainmentItem {
|
|||
function homeAction() {
|
||||
const isInWindow = (!WindowPlugin.WindowUtil.isShowingDesktop && WindowPlugin.WindowMaximizedTracker.showingWindow);
|
||||
|
||||
// Always close action drawer
|
||||
if (MobileShellState.ShellDBusClient.isActionDrawerOpen) {
|
||||
MobileShellState.ShellDBusClient.closeActionDrawer();
|
||||
}
|
||||
|
||||
if (isInWindow) {
|
||||
// only minimize windows and go to homescreen when not in docked mode
|
||||
if (!ShellSettings.Settings.convergenceModeEnabled) {
|
||||
Folio.HomeScreenState.closeFolder();
|
||||
Folio.HomeScreenState.closeSearchWidget();
|
||||
Folio.HomeScreenState.closeAppDrawer();
|
||||
Folio.HomeScreenState.goToPage(0);
|
||||
} else {
|
||||
|
||||
WindowPlugin.WindowUtil.isShowingDesktop = true;
|
||||
}
|
||||
} else { // if we are on the homescreen
|
||||
switch (Folio.HomeScreenState.viewState) {
|
||||
case Folio.HomeScreenState.PageView:
|
||||
if (Folio.HomeScreenState.currentPage === 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue