Set locked state while locking for grab.
Change-Id: If4b8fa77e6e3a288487a011e83791ad6a189675c Reviewed-by: Manish Sharma <83.manish@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
098e09c1ce
commit
c9b39637ee
|
@ -1277,10 +1277,12 @@ QImage QSGThreadedRenderLoop::grab(QQuickWindow *window)
|
|||
|
||||
QImage result;
|
||||
w->thread->mutex.lock();
|
||||
m_locked = true;
|
||||
QSG_GUI_DEBUG(w->window, " - locking, posting grab event");
|
||||
w->thread->postEvent(new WMGrabEvent(window, &result));
|
||||
w->thread->waitCondition.wait(&w->thread->mutex);
|
||||
QSG_GUI_DEBUG(w->window, " - locking, grab done, unlocking");
|
||||
m_locked = false;
|
||||
w->thread->mutex.unlock();
|
||||
|
||||
QSG_GUI_DEBUG(w->window, " - grab complete");
|
||||
|
|
Loading…
Reference in New Issue