From c5dda73d5b66811d82cf9ee9a36b09160b806a7c Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 28 May 2017 19:05:12 +0300 Subject: [PATCH] fix #497, fix crash on startup --this was crashing Latte on startup because the WindowsModel was loaded too early when the user had set "Show Background only for maximized windows" --- containment/package/contents/ui/WindowsModel.qml | 2 +- containment/package/contents/ui/main.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containment/package/contents/ui/WindowsModel.qml b/containment/package/contents/ui/WindowsModel.qml index 039f47ca0..def9d8dbe 100644 --- a/containment/package/contents/ui/WindowsModel.qml +++ b/containment/package/contents/ui/WindowsModel.qml @@ -49,7 +49,7 @@ Item{ Component.onCompleted: { windowsRepeater.model = tasksModel; - winModel.reconsiderMaximized(); + // winModel.reconsiderMaximized(); } } diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 7d3119e16..1d2b4028b 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -1150,7 +1150,7 @@ DragDrop.DropArea { } Loader{ - active: Qt.application.arguments.indexOf("--with-window") >= 0 + active: root.debugMode sourceComponent: DebugWindow{} } @@ -1168,7 +1168,7 @@ DragDrop.DropArea { Loader{ id: windowsModel - active: plasmoid.configuration.backgroundOnlyOnMaximized || root.disablePanelShadowMaximized + active: (plasmoid.configuration.backgroundOnlyOnMaximized || root.disablePanelShadowMaximized) && dock property bool hasMaximizedWindow: active && item ? item.maximizedWindowOnScreen : false sourceComponent: WindowsModel{}