Describe the bug
Backlight slider value does not update in real time after the control center has been closed and reopened at least once. First open after swaync start works; every subsequent open, external brightness changes (e.g. brightnessctl, XF86MonBrightnessUp/Down) no longer move the slider while the control center is visible. Volume slider works correctly in the same session.
Root cause
src/controlCenter/widgets/backlight/backlightUtil.vala:
- Constructor creates the
FileMonitor exactly once.
close() (on CC hide) calls monitor.cancel(). GLib FileMonitor is single-use; once cancelled it will not emit further changed signals.
start() (on CC show) calls connect_monitor() which only re-wires the changed callback onto the already-cancelled monitor. The monitor is never re-created, so no events fire.
To Reproduce
- Enable backlight widget.
- Open control center, press XF86MonBrightnessUp — slider updates.
- Close control center.
- Open it again, press XF86MonBrightnessUp — slider does not update (brightness itself does change).
Expected behavior
Slider updates every time, as the volume slider does.
Proposed fix
Recreate the FileMonitor in start() before connect_monitor(), or move monitor creation into connect_monitor() itself.
Desktop
- OS: CachyOS (Arch)
- swaync: 0.12.6-1.1
- Compositor: Hyprland
- Device:
gmux_backlight (Apple T2 MacBook)
Describe the bug
Backlight slider value does not update in real time after the control center has been closed and reopened at least once. First open after swaync start works; every subsequent open, external brightness changes (e.g.
brightnessctl, XF86MonBrightnessUp/Down) no longer move the slider while the control center is visible. Volume slider works correctly in the same session.Root cause
src/controlCenter/widgets/backlight/backlightUtil.vala:FileMonitorexactly once.close()(on CC hide) callsmonitor.cancel(). GLibFileMonitoris single-use; once cancelled it will not emit furtherchangedsignals.start()(on CC show) callsconnect_monitor()which only re-wires thechangedcallback onto the already-cancelled monitor. The monitor is never re-created, so no events fire.To Reproduce
Expected behavior
Slider updates every time, as the volume slider does.
Proposed fix
Recreate the
FileMonitorinstart()beforeconnect_monitor(), or move monitor creation intoconnect_monitor()itself.Desktop
gmux_backlight(Apple T2 MacBook)