Repository navigation
v0.1.19
Three bugs from one report, all of them reachable on any mouse — the one that found them was an Areson left to fall asleep.
A page that read nothing would write that to the mouse on Apply
When a window's read fails outright, every DPI widget keeps the value Adw.SpinRow starts at: capabilities.dpi_min, and all max_dpi_stages of them enabled. On an Areson that is six stages at 50 DPI, which looks enough like data to be mistaken for it. Apply then read straight off those widgets, so clicking it on such a page wrote a six-stage 50 DPI list over the real one.
Apply now refuses until something has actually been read off the mouse, and says so in the banner. @dbergPROTAKT found the state this comes from — cable to dongle on a mouse idle for five minutes, where nordic.open() times out reading the memory map and the whole page read fails at once — and only ever read, which is the single reason this is a near miss (#13).
Nothing retried a window read that found the mouse asleep
v0.1.18 made the tray pay back a read it lost that way. The window had no equivalent: its error banner stayed up and "Reload from mouse" went on failing for as long as the mouse stayed idle, with nothing retrying it on its own.
Now a page that read nothing reloads itself as soon as the mouse answers anything at all — the tray's read, or any battery reading, polled or pushed. Rate-limited to one attempt per ten seconds, so a mouse whose battery reads while its config does not can't set off a twenty-read reload for every report it pushes.
An app started with no mouse plugged in never looked again
With no device there is no tray, and the event listener and the battery timer are both the tray's — so nothing was watching, and plugging a mouse in afterwards did nothing until the app was restarted. A device-less start now looks every two seconds, and the first mouse to appear gets the tray and a window built for it.
All three found by @dbergPROTAKT on a Pulsar X2 Wireless (Areson) under KDE/Wayland, and verified here against an X2A — including the arrival case end to end, with find_device() pretending the mouse on the desk wasn't there.