I am currently working on a screensaver launcher, but I want to delay the activation of the screensaver for a period of time to ensure the mouse position is still in the position to activate it, to prevent accidental activation. I am thinking some kind of thread to check the position of the mouse for x secs before execution, would this be a sensible solution?
I'm not writing a screensaver, I have written an application so that when you move your mouse to a designated corner of your desktop, the screensaver comes on... I want to know how to add a delay to when you move the mouse into that corner to prevent accidental launching of the screensaver
If so how?
so that when you move your mouse to a designated corner of your desktop, the screensaver comes on...
When the mouse gets there, set a boolean and a timer. Make any mouse action clear the boolean.
Only when the timer fires and your flag is still there, proceed.
In other words, use a little state machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With