Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't read mouse status when condition is reached by termination.
authorArnaud Giersch <arnaud.giersch@free.fr>
Mon, 2 Dec 2013 09:08:32 +0000 (10:08 +0100)
committerArnaud Giersch <arnaud.giersch@free.fr>
Mon, 2 Dec 2013 09:08:32 +0000 (10:08 +0100)
DrawingWindow.cpp

index 1ab14ee..7015d6a 100644 (file)
@@ -669,7 +669,7 @@ bool DrawingWindow::waitMousePress(int &x, int &y, int &button,
     if (terminateThread) {
         pressed = false;
     } else {
-        pressed = mouseCondition.wait(&mouseMutex, time);
+        pressed = mouseCondition.wait(&mouseMutex, time) && !terminateThread;
         if (pressed) {
             x = mousePos.x();
             y = mousePos.y();