I have a little program where i need to somehow detect when the user just closes down his/her laptop screen. So; not turning of the entire computer but rather just closing down the screen.
Ive got a chat program and i need to make the user go offline when the screen is closed. For some reason my current socket connection is still alive when i just close down the screen.
Any ideas?