Adding in a '-delay ms' parameter to optionally prolong xrefresh

Andrew LeTourneau requested to merge centerorbit/xrefresh:add-delay into master

In this PR I've added an optional param '-delay ms' to allow a user to specify the length a refresh should occur for. This is particularly useful for screens that have slow response times.

Background: I have been using this program on my machine that has an e-ink monitor attached. Blanking the screen black helps to remove ghost images, since the screen needs periodic blanking to maintain crisp contrast (see: An issue that I had while using xrefresh as-is was that the blanking occurred too fast compared to the refresh rate of the monitor.

I also noticed that sometimes the refresh wouldn't occur at all, adding an XFlush(dpy); seems to fix this issue.

P.S. I'm new to this community, open to suggestions, and glad to contribute.

Edited by Andrew LeTourneau

Merge request reports