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()) {
|
||||
return {};
|
||||
}
|
||||
if (!windowItem->surfaceItem()) {
|
||||
|
||||
SurfaceItem *surfaceItem = window->surfaceItem();
|
||||
if (!surfaceItem || !surfaceItem->isVisible()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QRegion occlusion;
|
||||
if (!addCandidates(windowItem->surfaceItem(), ret, maxCount, occlusion)) {
|
||||
if (!addCandidates(surfaceItem, ret, maxCount, occlusion)) {
|
||||
return {};
|
||||
}
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue