Solaar/lib/logitech_receiver
grechmarlon c26f3cd6ec Fix per-key state loss: invalid editor zones and power-cycle cookie skip
Three related fixes for per-key lighting state being lost on the wire:

1. The per-key canvas models layout gaps as placeholder cells with
   zone_id -1. Paint strokes sweeping a gap emitted -1 in the delta,
   which entered the setting's map, was persisted, and then aborted
   EVERY subsequent full-map repaint at frame pack time
   (OverflowError: can't convert negative int to unsigned) — the apply
   was logged and ignored, so keys silently kept stale colors or went
   dark. Filter gap cells from the delta before it reaches the sink.

2. PerKeyLighting now sanitizes zone keys against the device-reported
   zone bitmap in update/write/read paths, so an already-poisoned
   persisted map (saved by a build without fix 1) heals on read instead
   of permanently breaking repaints.

3. WIRELESS_DEVICE_STATUS power-on reconfig requests went through the
   ConfigChange-cookie dedup gate. On a G915 TKL the cookie survives a
   power cycle, so the gate concluded nothing changed and skipped
   apply_all_settings — but power-on wipes volatile state (RGB buffers,
   host-mode lighting), leaving the keyboard dark until manual
   intervention. A powered-on notification now forces the apply.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 20:18:38 +02:00
..
__init__.py Refactor: Distinguish module from package 2024-09-15 09:18:51 -04:00
advanced_para_eq.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
base.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
base_usb.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
centurion.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
centurion_constants.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
common.py ui: Show offline status for receiver-paired device batteries (#3217) 2026-05-13 17:32:03 -04:00
descriptors.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
desktop_notifications.py testing: upgrade desktop notifications tests to take notifications availability into account 2025-01-02 10:47:53 -05:00
device.py Fix per-key state loss: invalid editor zones and power-cycle cookie skip 2026-06-11 20:18:38 +02:00
device_quirks.py headset RGB: fix G522 allowlist key — model byte is 0x32, not 0x33 2026-05-21 10:13:00 -04:00
diversion.py rules: remove use of XTest and use uinput in all cases 2026-03-08 20:58:43 -04:00
exceptions.py Use double quotes for module level docstrings 2024-06-02 09:54:21 -04:00
headset_rgb.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
hidpp10.py cli: Fix crash when showing notification flags. (#3070) 2025-12-12 04:54:10 -05:00
hidpp10_constants.py device: Handle composite IntFlag.name on Python < 3.11 (#3187) 2026-04-16 11:38:25 -04:00
hidpp20.py debug: add warning statements to determine reason for feature request failure 2026-06-09 19:35:00 -04:00
hidpp20_constants.py Drop 0x0623 probe — feature is unmapped and not in G HUB 2026-05-21 10:13:00 -04:00
i18n.py Unify imports in logitech package 2024-05-23 16:42:18 -04:00
listener.py debug: add warning statements to determine reason for feature request failure 2026-06-09 19:35:00 -04:00
logivoice.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
notifications.py Fix per-key state loss: invalid editor zones and power-cycle cookie skip 2026-06-11 20:18:38 +02:00
onboard_eq.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
receiver.py debug: add warning statements to determine reason for feature request failure 2026-06-09 19:35:00 -04:00
rgb_effects_probe.py Drop 0x0623 probe — feature is unmapped and not in G HUB 2026-05-21 10:13:00 -04:00
rgb_power.py rgb_control: honor the off state — don't auto-claim, init, or shutdown LEDs 2026-05-15 10:45:27 -04:00
settings.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
settings_new.py settings: add setting for HAPTIC feature 2025-11-12 14:50:46 -05:00
settings_templates.py Fix per-key state loss: invalid editor zones and power-cycle cookie skip 2026-06-11 20:18:38 +02:00
settings_validator.py Add RGB lighting persistence and software LED power management for G515 2026-05-13 19:03:44 -04:00
special_keys.py device: add special keys from Logitech 2025-10-16 20:57:15 -04:00