Repository navigation
Conversation
A lock surface created under a resting pointer gets a position event with no motion behind it, and the lock took that for the user moving the mouse. On a monitor that drops off the bus when blanked (Apple Silicon DCP over USB-C to DisplayPort does this), every blank removes and re-adds the output, the new surface wakes the displays, the blank timer re-arms, and the screen cycles on and off for as long as the machine stays locked. The lock now wakes only once the pointer actually moves across a surface. Clicks, keys and typing still wake it as before.
The reference position moved with every event, so a pointer creeping in sub-pixel steps -- a slow nudge on a scaled display -- never got a whole pixel from it and never woke the lock. It now holds until the pointer has gone a pixel from where it was last counted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed by Claude Opus 5.5, with Codex Medium as a second opinion, and run on an Omarchy ISO worker. I don't have an M1 to reproduce the DCP dropout itself, so I stood in for it with Hyprland headless outputs. The mechanism is real, and the change stops it. With the screen locked and blank, adding an output woke every display on current One defect, fixed on your branch in fbc0cfc. On Two things decide what happens next, and only your machine can answer them:
If it still cycles, the fix has to cover a display arriving while the lock has the displays off. That changes the behaviour #15294 chose, so the maintainer has to decide it. The new test checks Waiting on you for the M1 result. |
[Medium impact] The PR appears safe to merge; no actionable defects remain. SummaryThe lock now ignores the first pointer position on a surface and wakes only after movement reaches one logical pixel.
No new actionable issues were found. The previous test-coverage finding is addressed. Tests were not run. Reviews (2) · Last reviewed commit: "Test the lock's pointer wake through the..." · Reviewed by Greptile |
|
Thanks for the thorough review and the sub-pixel fix! I've run both checks on the M1. I merged To your second question: the returning output comes back lit ( I also took Greptile's point about the test. The wake now goes through a small |
|
Thanks for running both checks on the M1. That answers the question I left open: on your hardware the returning display comes back lit, the restarted countdown from #15294 blanks it, and this change keeps its arrival from counting as a wake. Re-reviewed at c2064cb by Claude Opus 5.5, with Codex Medium as a second opinion, and run on an Omarchy ISO worker. Reproduced on current The test change holds up. Codex found nothing that needs changing. Two notes I'm not acting on: a single motion report that crosses from one blank display onto another and then stops is swallowed as a first position, and the grep in the test is tied to the exact formatting of the Two older pull requests fix the same symptom differently. #10343 ignores pointer motion for ten seconds after any display change, so someone who moves the mouse just after a monitor is plugged in or returns gets no wake. #11991 removes pointer-motion wake altogether. This one filters only the position a fresh surface reports and keeps every later motion as a wake, so I'd suggest it over both. Codex reached the same choice when asked separately, though it could read this session's notes, so that agreement isn't fully independent. Nothing is left for you to do. It's waiting on the maintainer. |
Locking an M1 Pro in clamshell with a monitor on USB-C to DisplayPort left the screen cycling on and off until I pulled the power. On Asahi the DCP reports the port disconnected the moment it blanks, then brings it back about 1.4 seconds later. Each time the output goes and comes back the lock maps a new surface under the resting pointer, and the MouseArea's position event on that surface counted as the user moving the mouse. That woke the displays, re-armed the five-second blank, and started it all over.
The lock now only wakes once the pointer has actually moved across a surface, so a surface appearing under a still pointer is ignored. Clicks, keys and typing wake it as before. I confirmed it with logging in LockView on the affected machine, where every position after a hotplug landed on a fresh surface with no prior position, and with the change the cycling stopped. The new lock-pointer-wake test covers the motion check.