user-1: I was playing a game with someone and they left because they knew they were going to lose. This is a really annoying thing that has happened to me. I would like to know if there is a chess program that knows if someone has switched to another screen.

user27298: Chess.com detects it as well. If they by chance disconnect due to internet issues, it will show a bar that fluctuates based on wifi strength. They have a certain time to reconnect.
Chess.com additionally gives warnings and will ban that user if they consistently leave matches, so you don't have to worry about them.
For a chess program that can check if they switch screens, I doubt that as of late. It may be possible to check servers, but that could cause an invasion of privacy, as well as consent needed to "share screen" or some sort. If you have suspicions, you can send a message to the developers and tell them, and chess.com allows you to review your opponents accuracy and time of moves, to check if they truly have been making moves they shouldn't have been able to.

user17126: Lichess (http://lichess.org) has some ability to detect when your opponent has left the game. When that happens, it gives your opponent a brief chance to rejoin, then allows you to claim a victory or a draw if they do not rejoin. If Lichess detects that your opponent has left, it will show a counter counting down the seconds until you can claim victory. The amount of time on the counter seems to depend on the time control and other factors. If Lichess does not detect that your opponent has left, but they decide to run out the clock, Lichess will not allow you to claim a victory, but will still automatically penalize your opponent with a ban after repeated offenses.
Note that none of this happens in correspondence chess, as temporarily leaving the game is normal in that time control.

-1: <p>I was playing a game with someone and they left because they knew they were going to lose. This is a really annoying thing that has happened to me. I would like to know if there is a chess program that knows if someone has switched to another screen.</p>
 27298: <p>Chess.com detects it as well. If they by chance disconnect due to internet issues, it will show a bar that fluctuates based on wifi strength. They have a certain time to reconnect.</p>
<p>Chess.com additionally gives warnings and will ban that user if they consistently leave matches, so you don't have to worry about them.</p>
<p>For a chess program that can check if they switch screens, I doubt that as of late. It may be possible to check servers, but that could cause an invasion of privacy, as well as consent needed to &quot;share screen&quot; or some sort. If you have suspicions, you can send a message to the developers and tell them, and chess.com allows you to review your opponents accuracy and time of moves, to check if they truly have been making moves they shouldn't have been able to.</p>
 17126: <p>Lichess (<a href="http://lichess.org" rel="nofollow noreferrer">http://lichess.org</a>) has some ability to detect when your opponent has left the game. When that happens, it gives your opponent a brief chance to rejoin, then allows you to claim a victory or a draw if they do not rejoin. If Lichess detects that your opponent has left, it will show a counter counting down the seconds until you can claim victory. The amount of time on the counter seems to depend on the time control and other factors. If Lichess does not detect that your opponent has left, but they decide to run out the clock, Lichess will not allow you to claim a victory, but will still automatically penalize your opponent with a ban after repeated offenses.</p>
<p>Note that none of this happens in correspondence chess, as temporarily leaving the game is normal in that time control.</p>
