Should switch to Away mode when locking screen on Windows 10
Must be some change (or rather bug) in Windows 10 that Spark is not switching into Away mode when Windows 10 machine is locked, until a user taps/clicks on a lock screen picture and login screen is shown. As Spark is a platform independent Java based application it is not clear if there could be workaround added. Unless Java 9 or later will have a fix for that. Or maybe Windows 10 will be fixed eventually.
Filing this as a task, as i do believe this is a buggy Windows 10 behavior. Works fine on XP, Win7 and even Win 8.1.
Btw, tested on Anniversary Update (1607, build 14393.10)
i think this could be addressed with jna. using some examples I've found online and hacking around the best i can (limited knowledge here!) I was able to get this to work(ish)
a similar process could prob be used for linux and osx as well.
Maybe this will help a more experience dev when it come times to look at this
The idle code looks for a mouse pointer location.
when the screen gets locked, windows sets a specific location ,which in turn triggers the change in presence.
It appears that with windows 10, the lock screen has the wallpaper overlay, which doesn't change the mouse location..however when you go to the "true" lock screen, the mouse location changes to what spark is looking for, and fires off the change in presence.
As a temp work around, you can disable the lock screen overlay by using a group policy or changing the registry.