Usually it's up to the underlying window manager to handle this, but some Windows apps tend to implement things like this on their own. I suppose you just have to handle move events and "dock" the window to the edge of the screen once it's moved close enough.
Bookmarks