From 99b87766b5daccf18bcb0be7f4bb455f83e5fc97 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 13 Jan 2025 12:03:35 +1000 Subject: [PATCH] Fix screen unblanking Set the window property instead of relying on the windowChanged signal to provide the value. Otherwise, ScreenBlanker::eventFilter() does not receive the touch events as expected. Fixes #1831 --- ApplicationContent.qml | 5 +++-- Main.qml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ApplicationContent.qml b/ApplicationContent.qml index 8f0e3988b..2400aa8c4 100644 --- a/ApplicationContent.qml +++ b/ApplicationContent.qml @@ -4,6 +4,7 @@ */ import QtQuick +import QtQuick.Window import QtQuick.Controls as QtQuickControls import Victron.VenusOS @@ -11,6 +12,7 @@ Item { id: root property alias mainView: mainView + property Window window property var _inputComponent @@ -43,12 +45,11 @@ Item { Component.onCompleted: Global.firmwareUpdate = firmwareUpdate } - onWindowChanged: function (window) { screenBlanker.window = window } - ScreenBlanker { id: screenBlanker enabled: !Global.splashScreenVisible && !(!!Global.pageManager && Global.pageManager.statusBar.notificationButtonVisible) displayOffTime: displayOffItem.isValid ? 1000*displayOffItem.value : 0.0 + window: root.window property VeQuickItem displayOffItem: VeQuickItem { uid: !!Global.systemSettings ? Global.systemSettings.serviceUid + "/Settings/Gui/DisplayOff" : "" } diff --git a/Main.qml b/Main.qml index 9b61d043a..fe745c2ba 100644 --- a/Main.qml +++ b/Main.qml @@ -104,6 +104,7 @@ Window { active: Global.dataManagerLoaded sourceComponent: ApplicationContent { anchors.centerIn: parent + window: root } }