February 25th, 2015

Why does the mouse cursor jump a few pixels if you click on the very bottom row of pixels on the taskbar?

ABCDSchuetze discovered that if you click on the very bottom row of pixels of the taskbar, the mouse cursor jumps up a few pixels. Why is that?

In order to take advantage of Fitts’s Law, the bottom-most row of pixels on a bottom-docked taskbar are clickable. Even though they are technically on the dead border of the window, the taskbar redirects the click to the button immediately above the border. But then you have this problem:

  • User clicks on the border pixel between the button and the edge of the screen.
  • The taskbar remaps the click to the button, thereby activating the button.
  • The button takes capture because that’s what buttons do when you click on them. This allows you to drag off the button to cancel the click.
  • But wait: Since the mouse is on the border, it is already outside the button.
  • Result: The button cancels immediately.

The short version: Clicking on the Fitts’s edge causes the button to be pressed and then immediately canceled.

The fix is to nudge the mouse back inside the button when the click begins.

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.

Feedback