scene: Fix attempting to scanout empty surfaces
X11 windows might be mapped but temporarily have missing wl_surface or the wl_surface can be temporarily unmapped. CCBUG: 491964
This commit is contained in:
parent
5b2304c709
commit
8443da3083
1 changed files with 5 additions and 2 deletions
|
@ -208,11 +208,14 @@ QList<SurfaceItem *> WorkspaceScene::scanoutCandidates(ssize_t maxCount) const
|
||||||
if (!window->isClient() || window->opacity() != 1.0 || !window->isFullScreen() || window->windowItem()->hasEffects()) {
|
if (!window->isClient() || window->opacity() != 1.0 || !window->isFullScreen() || window->windowItem()->hasEffects()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
if (!windowItem->surfaceItem()) {
|
|
||||||
|
SurfaceItem *surfaceItem = window->surfaceItem();
|
||||||
|
if (!surfaceItem || !surfaceItem->isVisible()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRegion occlusion;
|
QRegion occlusion;
|
||||||
if (!addCandidates(windowItem->surfaceItem(), ret, maxCount, occlusion)) {
|
if (!addCandidates(surfaceItem, ret, maxCount, occlusion)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue