Waybar fails to handle new niri IPC event `CastsChanged` (unknown variant)
bugenhancementcustomclock
### Description
Waybar fails to parse niri IPC events after niri introduced a new event variant `CastsChanged`.
This results in repeated errors and broken updates when using niri modules (e.g. workspaces).
### Logs
Niri IPC error reading from event stream e=unknown variant CastsChanged, expected one of WorkspacesChanged, WorkspaceUrgencyChanged, WorkspaceActivated, WorkspaceActiveWindowChanged, WindowsChanged, WindowOpenedOrChanged, WindowClosed, WindowFocusChanged, WindowFocusTimestampChanged, WindowUrgencyChanged, WindowLayoutsChanged, KeyboardLayoutsChanged, KeyboardLayoutSwitched, OverviewOpenedOrClosed, ConfigLoaded, ScreenshotCaptured
<img width="2519" height="236" alt="Image" src="https://github.com/user-attachments/assets/dcdb631a-fcb1-4c43-b235-24462ad9d34a" />
### Steps to reproduce
1. Install latest niri (26.04+)
2. Install Waybar (stable, from pacman)
3. Enable niri-related modules in Waybar (e.g. workspaces)
4. Launch Waybar
### Expected behavior
Existing IPC clients should not break when new event variants are introduced.
Unknown events should ideally:
- be ignored, or
- not break the event stream
### Actual behavior
Waybar fails to deserialize IPC events due to unknown variant `CastsChanged`, causing repeated errors and broken updates.
### System Information
* niri version: 26 04
* Distro: Arch Linux
* GPU: NVIDIA GeForce RTX 4060 Max-Q
* CPU: Intel(R) Core(TM) i9-14900HX (32) @ 5.80 GHz
### Additional context
This appears to be caused by adding a new IPC enum variant (`CastsChanged`) without backward compatibility.
A possible improvement could be:
- allowing unknown IPC variants to be ignored safely
- or introducing IPC versioning / compatibility handling
This would prevent breakage of existing ecosystem tools like Waybar.
0 条评论