Semi-Fix brightness

Seems the ondisconnect is called if someone closed the window.