mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-29 20:34:46 +01:00
Fix windows on multiple tags not rendering
This commit is contained in:
parent
bbc2b4574f
commit
5844665cb2
1 changed files with 11 additions and 4 deletions
|
@ -248,10 +248,17 @@ impl WindowElement {
|
|||
|
||||
/// RefCell Safety: This uses RefCells on both `self` and everything in `outputs`.
|
||||
pub fn is_on_active_tag<'a>(&self, outputs: impl IntoIterator<Item = &'a Output>) -> bool {
|
||||
let mut tags = outputs.into_iter().flat_map(|op| {
|
||||
op.with_state(|state| state.focused_tags().cloned().collect::<Vec<_>>())
|
||||
});
|
||||
self.with_state(|state| state.tags.iter().any(|tag| tags.any(|tag2| tag == &tag2)))
|
||||
let tags = outputs
|
||||
.into_iter()
|
||||
.flat_map(|op| op.with_state(|state| state.focused_tags().cloned().collect::<Vec<_>>()))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
self.with_state(|state| {
|
||||
state
|
||||
.tags
|
||||
.iter()
|
||||
.any(|tag| tags.iter().any(|tag2| tag == tag2))
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns `true` if the window element is [`Wayland`].
|
||||
|
|
Loading…
Add table
Reference in a new issue