From b90387c5d43606283eaf046eace46c9e4c4e7666 Mon Sep 17 00:00:00 2001 From: giersch Date: Tue, 6 Nov 2007 21:18:45 +0000 Subject: [PATCH] . --- DrawingWindow.cpp | 2 +- test/hello.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DrawingWindow.cpp b/DrawingWindow.cpp index b60eb06..64508ff 100644 --- a/DrawingWindow.cpp +++ b/DrawingWindow.cpp @@ -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(); } diff --git a/test/hello.cpp b/test/hello.cpp index bc1a62e..fe2f2a0 100644 --- a/test/hello.cpp +++ b/test/hello.cpp @@ -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); -- 2.20.1