Repository navigation
Avoid showing a negative default pointer speed - #1515
Conversation
Some devices, such as a Magic Mouse, report a pointer resolution above the range LinearMouse maps to pointer speed, so the default speed shown in Pointer settings came out negative. Clamp the default speed shown for a device to 0...1. The conversion and the configuration are unchanged, and reverting to system settings still writes the original resolution back. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Closes #1497.
Closes #487.
Some devices, such as a Magic Mouse, report a pointer resolution outside the range LinearMouse maps to pointer speed. When no speed is configured, Pointer settings converted that resolution directly and showed a negative default speed, such as -0.0086.
The default speed shown for a device is now clamped to the slider's 0–1 range. This only changes what is displayed: the conversion, the configuration format and existing configurations are unchanged, and reverting to system settings still restores the device's original resolution.
Changes
Device.defaultPointerSpeed(fromPointerResolution:), which clamps the converted speed to 0–1, and use it forDevice.pointerSpeed.🤖 Generated with Claude Code