From 77ef2b6b7eedf9550fa5b100fc2973bb4e5f867f Mon Sep 17 00:00:00 2001
From: James Turner <zakalawe@mac.com>
Date: Sun, 1 Sep 2019 12:58:21 +0100
Subject: [PATCH] FGQCanvas: Fix UI visibility in daemon mode

---
 utils/fgqcanvas/qml/Window.qml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/utils/fgqcanvas/qml/Window.qml b/utils/fgqcanvas/qml/Window.qml
index 9a3ab7606..a211ef7c0 100644
--- a/utils/fgqcanvas/qml/Window.qml
+++ b/utils/fgqcanvas/qml/Window.qml
@@ -7,10 +7,16 @@ Rectangle {
     color: "black"
 
     // only show the UI on the main window
-    property double __uiOpacity: (isMainWindow && _application.showUI) ? 1.0 : 0.0
+    property double __uiOpacity: __shouldShowUi ? 1.0 : 0.0
     property bool __uiVisible: true
+    readonly property bool __shouldShowUi: (isMainWindow && _application.showUI)
     readonly property bool isMainWindow: (_windowNumber === 0)
 
+    Component.onCompleted: {
+        // synchronize insitial state of this
+        __uiVisible = __shouldShowUi;
+    }
+
     Behavior on __uiOpacity {
         SequentialAnimation {
             ScriptAction { script: if (_application.showUI) __uiVisible = true; }