Ensure that the X11Renderer doesn't render after reparente to Deleted

This commit is contained in:
Martin Gräßlin 2014-12-02 14:12:48 +01:00
parent 4c9744fe8e
commit d81e5697bf

View file

@ -104,14 +104,17 @@ void X11Renderer::reparent(Deleted *deleted)
{
if (m_scheduleTimer->isActive()) {
m_scheduleTimer->stop();
disconnect(m_scheduleTimer, &QTimer::timeout, this, &X11Renderer::render);
disconnect(this, &Renderer::renderScheduled, m_scheduleTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
}
disconnect(m_scheduleTimer, &QTimer::timeout, this, &X11Renderer::render);
disconnect(this, &Renderer::renderScheduled, m_scheduleTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
Renderer::reparent(deleted);
}
void X11Renderer::render()
{
if (!client()) {
return;
}
const QRegion scheduled = getScheduled();
if (scheduled.isEmpty()) {
return;