Well, if I run the Processing example Topics > Drawing > Continuous Lines, when I draw and the mouse goes out of the window, the drawing is stopped, until I go back into the window (keeping the mouse button down). Is that what you mean?
Perhaps check mouseX vs. pmouseX and mouseY vs. pmouseY. If both doesn't change, don't draw anything: coordinates don't change when mouse is outside of window. And if user doesn't move the mouse, there is nothing to draw either.
Leave a comment on PhiLho's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic