+ d->dirty(r);
+ d->safeUnlock(d->imageMutex);
+}
+
+bool DrawingWindow::sync(unsigned long time)
+{
+ bool ret;
+ d->safeLock(d->paintMutex);
+ d->safeLock(d->imageMutex);
+#if 1
+ d->dirty(); // xxx
+#else
+ QApplication::postEvent(this, new QPaintEvent(this->rect()));
+ d->dirtyFlag = false;
+#endif
+ d->safeUnlock(d->imageMutex);
+ ret = d->paintCondition.wait(&d->paintMutex, time);
+ d->safeUnlock(d->paintMutex);
+ return ret;