aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2022-09-15 16:02:31 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2023-02-01 06:28:21 +0000
commit65ff00c7cc1f30d16f8a689e44f8d59d00af9255 (patch)
tree2b2901042fba52344636589693133bb2e0b6e9a6 /src
parent79adc3cc5395e33309123c7665d9891e4799aba8 (diff)
Disable shadow input cursor blinking while invisible
Shadow input control consumes resources in vain by blinking invisible cursor. This change disables the cursor blinking while invisible. Pick-to: 5.15 6.2 6.4 6.5 Change-Id: Icc9d8684285f5adbcf70388d961b7e5141a16197 Reviewed-by: <vaibhav.kumar@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Diffstat (limited to 'src')
-rw-r--r--src/components/ShadowInputControl.qml5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/ShadowInputControl.qml b/src/components/ShadowInputControl.qml
index aa9b8e31..064748d4 100644
--- a/src/components/ShadowInputControl.qml
+++ b/src/components/ShadowInputControl.qml
@@ -68,7 +68,8 @@ Item {
onCursorPositionChanged: {
cursorSyncTimer.restart()
blinkStatus = true
- cursorTimer.restart()
+ if (cursorTimer.running)
+ cursorTimer.restart()
}
onSelectionStartChanged: cursorSyncTimer.restart()
onSelectionEndChanged: cursorSyncTimer.restart()
@@ -97,7 +98,7 @@ Item {
id: cursorTimer
interval: Qt.styleHints.cursorFlashTime / 2
repeat: true
- running: true
+ running: control.visible
onTriggered: shadowInput.blinkStatus = !shadowInput.blinkStatus
}
}