rewrite Move_cursor_with_constraints() to clip negative coordinates
also introduce Handle_mouse_btn_change() so we don't bother to check everything when only the mouse button state changed