Skip to content

Commit

Permalink
Fix screen unblanking
Browse files Browse the repository at this point in the history
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
  • Loading branch information
blammit committed Jan 13, 2025
1 parent ab884e9 commit 99b8776
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ApplicationContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
*/

import QtQuick
import QtQuick.Window
import QtQuick.Controls as QtQuickControls
import Victron.VenusOS

Item {
id: root

property alias mainView: mainView
property Window window

property var _inputComponent

Expand Down Expand Up @@ -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" : ""
}
Expand Down
1 change: 1 addition & 0 deletions Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Window {
active: Global.dataManagerLoaded
sourceComponent: ApplicationContent {
anchors.centerIn: parent
window: root
}
}

Expand Down

0 comments on commit 99b8776

Please sign in to comment.