Fix crash in Unmanaged without compositing

Without compositing we don't have surfaceItems

BUG: 435322
This commit is contained in:
David Edmundson 2021-04-05 12:54:25 +01:00
parent 8bbd186f8e
commit c53b2fa3c5

View file

@ -77,7 +77,9 @@ void Unmanaged::initialize()
// and us setting up damage tracking. If the client wins we won't get a damage event even
// though the window has been painted. To avoid this we mark the whole window as damaged
// and schedule a repaint immediately after creating the damage object.
surfaceItem()->addDamage(surfaceItem()->rect());
if (auto item = surfaceItem()) {
item->addDamage(item->rect());
}
}
bool Unmanaged::track(xcb_window_t w)