Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.
authorgiersch <giersch>
Tue, 6 Nov 2007 21:18:45 +0000 (21:18 +0000)
committergiersch <giersch>
Tue, 6 Nov 2007 21:18:45 +0000 (21:18 +0000)
DrawingWindow.cpp
test/hello.cpp

index b60eb06..64508ff 100644 (file)
@@ -189,6 +189,7 @@ void DrawingWindow::closeEvent(QCloseEvent *ev)
 
 void DrawingWindow::customEvent(QEvent *)
 {
+    d->paintMutex.lock();
     d->imageMutex.lock();
     if (d->dirtyFlag) {
         QRect r = d->dirtyRect;
@@ -197,7 +198,6 @@ void DrawingWindow::customEvent(QEvent *)
         repaint(r);
     } else
         d->imageMutex.unlock();
-    d->paintMutex.lock();
     d->paintCondition.wakeAll();
     d->paintMutex.unlock();
 }
index bc1a62e..fe2f2a0 100644 (file)
@@ -152,7 +152,7 @@ void rectangles(DrawingWindow &w)
 
 int main(int argc, char *argv[])
 {
-    const int w = 1000;
+    const int w = 700;
     const int h = 700;
     QApplication application(argc, argv);