noctalia-shell
noctalia-shell copied to clipboard
Disable debounce in non-DDC monitor
Feature Description
I encountered lag when adjusting the brightness. After debugging, I found that this issue was caused by
https://github.com/noctalia-dev/noctalia-shell/blob/fe8e23f1d0e6ed4bdefd061e6834c4d61f2266be/Services/Hardware/BrightnessService.qml#L457
However, when controlling the "internal" display, debouncing seems unnecessary.
Therefore, I suggest removing the debouncing or adding an option to choose when controlling the internal display.
Why Is This Needed?
As above.
Suggested Solutions
// Timer for debouncing rapid changes
readonly property Timer timer: Timer {
interval: monitor.isDdc ? 250 : 0
onTriggered: {
if (!isNaN(monitor.queuedBrightness)) {
monitor.setBrightness(monitor.queuedBrightness);
monitor.queuedBrightness = NaN;
}
}
}
Additional Context
None.
Yeah will do, I have that on my todo list for a few weeks.