/* Q_OBJECT */
public:
- typedef int (*ThreadFunction)(DrawingWindow &);
+ typedef void (*ThreadFunction)(DrawingWindow &);
static const int DEFAULT_WIDTH = 640;
static const int DEFAULT_HEIGHT = 480;
bool dirtyFlag;
QRect dirtyRect;
+ bool mutex_enabled;
QMutex mutex;
void initialize(ThreadFunction fun, int width, int height);
inline
void DrawingWindow::lock()
{
- mutex.lock();
+ if (mutex_enabled)
+ mutex.lock();
+ if (!mutex_enabled)
+ mutex.unlock();
}
inline