compositor.cache: fix MultiCache::has()

This commit is contained in:
Victor Berger 2021-10-18 19:00:42 +02:00 committed by Victor Berger
parent 7ad40d3f3a
commit 121014a9eb
2 changed files with 9 additions and 1 deletions

View File

@ -34,6 +34,12 @@
### Bugfixes
#### Clients & Protocols
- `Multicache::has()` now correctly does what is expected of it
#### Backends
- EGLBufferReader now checks if buffers are alive before using them.
- LibSeat no longer panics on seat disable event.

View File

@ -176,7 +176,9 @@ impl MultiCache {
/// Check if the container currently contains values for type `T`
pub fn has<T: Cacheable + Send + 'static>(&self) -> bool {
self.caches.iter().any(|c| c.as_any().is::<T>())
self.caches
.iter()
.any(|c| (**c).as_any().is::<RefCell<CachedState<T>>>())
}
/// Commits the pending state, invoking Cacheable::commit()