Skip to content

Start the GUI's hidraw listeners for drivers that declare an interface - #19

Merged
packerlschupfer merged 1 commit into
packerlschupfer:mainfrom
f-o-o-g-s:gui-listeners-hidraw-interface
Oct 14, 2026
Merged

packerlschupfer merged 1 commit into
packerlschupfer:mainfrom
f-o-o-g-s:gui-listeners-hidraw-interface

Conversation

@f-o-o-g-s

Copy link
Copy Markdown
Contributor

After a59543f, _reports_events() in gui.py still asks whether a driver overrides find_hidraw(). None of the built-in drivers do any more, so it's False for all 15 and none of the GUI's three listeners start: the tray (DPI button and signal), the Home page's Connection Quality row, and Input Test. find_hidraw() itself still returns the right node, which is why check-drivers didn't catch it.

Found it doing the screenshots for #18. The 1K dongle was sending 05 0d once a second on hidraw1, but Home sat on a dash.

The fix also counts a driver that sets _HIDRAW_INTERFACE. I kept the override test for plugin drivers that bring their own find_hidraw(). Every built-in driver gets the same answer it got on a59543f^, I checked all 15.

Also added a check-drivers check: every driver that declares _HIDRAW_INTERFACE has to get a listener. With the old line restored it fails on all 15. It imports gui.py, so on a machine without GTK 4 and libadwaita it prints SKIP instead of failing. CI has both.

Tested on an X3 on the 1K dongle: Home's Connection Quality row filled in (96%, Excellent) within the screenshot script's 3.5 s wait. I only checked the Home row on hardware. The tray and Input Test go through the same function.

a59543f moved find_hidraw() into PulsarDevice, but gui._reports_events()
still asked whether a driver overrides it. No built-in driver does any
more, so it was False for all 15 and none of the three listeners started:
the tray's (DPI button and signal quality), the Home page's Connection
Quality row, and Input Test's. find_hidraw() itself still returned the
right node, which is why check-drivers.py didn't notice.

_reports_events() now also counts a driver that sets _HIDRAW_INTERFACE.
The override test stays for plugin drivers that bring their own
find_hidraw(). Every built-in driver gets the same answer it got before
a59543f.

check-drivers.py gets a check that every driver declaring
_HIDRAW_INTERFACE gets a listener. With the old line back it fails on all
15. It imports gui.py, so without GTK 4 and libadwaita it is skipped
rather than failed.
@packerlschupfer
packerlschupfer merged commit 3e19656 into packerlschupfer:main Oct 14, 2026
1 check passed
packerlschupfer pushed a commit that referenced this pull request Oct 14, 2026
Taken with tools/screenshots.py, 8 of 8, from a Pulsar X3 on the 1K
dongle (3710:5402), so the set now has the Power page, battery and
Connection Quality. 09-tray.png is unchanged: it's taken by hand and my
panel draws the menu in its own style.

Taken with the listener fix from #19 applied, since without it Connection
Quality stays on a dash, and with an empty XDG_CONFIG_HOME and no desktop
env vars so my own GTK theme stayed out of it (#18).
@packerlschupfer

Copy link
Copy Markdown
Owner

Merged. My regression: hoisting find_hidraw() into PulsarDevice in a59543f left _reports_events() asking a question no built-in driver could answer True to any more.

Checked your check by restoring the old line — fails on all 15, exit 1. And on hardware here: False on a59543f, True on this, /dev/hidraw5 either way, so it was only ever the gate. Never shipped; a59543f is after v0.1.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants