This avoids putting internal coordinates out of screen and causing cursor spasms while dragging beyond the edge.
state
g_state
win:rotate