Comment 13 for bug 710356

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Ok, here's some patches to make this work right.

Basically, it works so that if the mouse cursor hits the edge of the screen, any mouse movements which are parallel to the screen edge (eg up and down on a left edge) will be treated as mouse movements in the direction of the edge, so you resize a window so that the cursor hits the edge of the screen, and then move it up and down to "complete" the resize. This sort of works in a fitts-law kind of way where we know that the cursor motion isn't really going to be "precisely" left or right, but rather the user will physically move the mouse in such a way where there is going to be noise in the opposite direction anyways, so might as well use that noise to see how much they are "trying". Once the window hits the edge of the screen it stops counting these up and down movements as cursor motion, since that would end up breaking snap-back.

Attaching the first patch - second patch in the next comment (launchpad needs a way to attach multiple things to a comment) and here is a video of how it works should we be too lazy to rebuild :)

http://smspillaz.ucc.asn.au/unity/enh_borders.ogv