diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index f369fe4080..34538532c0 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -690,7 +690,13 @@ void SurfaceInterfacePrivate::commitFromCache() bool SurfaceInterfacePrivate::computeEffectiveMapped() const { - return bufferRef && (!subSurface || subSurface->parentSurface()->isMapped()); + if (!bufferRef) { + return false; + } + if (subSurface) { + return subSurface->parentSurface() && subSurface->parentSurface()->isMapped(); + } + return true; } void SurfaceInterfacePrivate::updateEffectiveMapped()