highgui: is there a way to detect when the window is closed?
The question is all in the object, however I'll explain a bit the
I have made a small tool where I can click and do stuff on the image,
drwaing lines and points on it. So there's a mouse callback function
and then a loop where the drawing function is called repeatedly as to
apply the changes that I input from the mouse (e.g., drawing circles
where I click).
Now, if I close the window form the "x" button, what happes is that
the system gets stuck in the loop, without actually doing anything.
Is there a way to detect when the x is pressed and therefore get out
of the loop?
I see the also the samples suffer form the same problem...