2004-04-13 · in Ideas · 177 words

I use X's screensaver support to turn off my monitor when I'm not using my computer. It's annoying if I put the screensaver on and then accidentally jog the desk, because the slight mouse movement turns the screensaver off again. The same problem shows up in MPlayer: it hides the mouse pointer if it hasn't moved for a while, but jogging the mouse makes it show up again. Since some mice (particularly optical models) will jump back and forth between two positions if they're on an uneven surface, this sometimes happens even if you haven't moved the mouse.

One possible solution would be to make the mouse movement detection less sensitive when the screensaver is active: require a really positive motion -- say, at least 5 pixels in any direction -- for the mouse to be detected as moving. A simpler approach that'd work for both of these cases would be to just ignore the mouse entirely and wait for keypresses instead, but that loses the convenience of being able to shove the mouse to wake the machine up.