Fix desktop brightness bug.

Now it can properly detect desktop (user did not open any foreground
window). Only tested in win7, possibly going to break in xp.