Description
Currently we have the following going on in the destroy part of selection-edge:
Lines 142 to 147 in 1a9964a
Instead of sleeping, we might want to detect whether the screen got repainted or not more reliably. This way, users who have a fast/low-latency system won't have to unnecessarily pay for the ~80ms sleep.
The XDamage extension might work. But my previous experience with it wasn't very fruitful.
And if we cannot detect it more reliably, then we might want to listen for vblank rather than sleeping a fixed amount. Listening for about 4~5
vblanks should be okay, on 60hz monitors that'll be around 80ms, on faster 240hz it'll be about ~21ms. (Unfortunately, I don't know any simple way to listen for vblanks on X without depending on opengl/GLX).