Update Smithay, with Window that supports X11 surfaces

This commit is contained in:
Ian Douglas Scott 2024-02-21 13:24:56 -08:00 committed by Victoria Brekenfeld
parent 849882a7db
commit 3036448c19
24 changed files with 482 additions and 619 deletions

View file

@ -44,6 +44,7 @@ use smithay::{
seat::WaylandFocus,
xdg_activation::{XdgActivationState, XdgActivationToken},
},
xwayland::X11Surface,
};
use std::{
collections::{HashMap, HashSet, VecDeque},
@ -418,6 +419,13 @@ impl Workspace {
})
}
pub fn element_for_x11_surface(&self, surface: &X11Surface) -> Option<&CosmicMapped> {
self.floating_layer
.mapped()
.chain(self.tiling_layer.mapped().map(|(_, w, _)| w))
.find(|e| e.windows().any(|(w, _)| w.x11_surface() == Some(surface)))
}
pub fn element_under(
&mut self,
location: Point<f64, Global>,