Windows don't snap when grabbed near screen edge.

When I grab the window titlebar close to one of the edges of the desktop (top, bottom, or sides), snapping does not work. I think the desired behavior should be to snap the window regardless of where the titlebar was initially grabbed.

I changed the code so that "isdrag" gets set to 1 in the failing cases.