And another thing for today: finally made it so niri waits a bit for the lock screen to paint before locking the session. This fixes the "red flash" issue.
Please test this since it's security sensitive. I already caught one mistake before pushing where killing a lock screen, then spawning a new one, would briefly flash the session contents.
(Note that some lockers fade in from transparency, so you'll still briefly see red, that's just the niri locked session background.)