xwayland: improve damage tracking
This commit is contained in:
parent
f4e8d132f3
commit
52c9fac23b
5 changed files with 39 additions and 23 deletions
|
|
@ -5,7 +5,7 @@ use {
|
|||
SurfaceExt, WlSurface, WlSurfaceError,
|
||||
},
|
||||
leaks::Tracker,
|
||||
tree::ToplevelNode,
|
||||
tree::{Node, ToplevelNode, ToplevelNodeBase},
|
||||
utils::clonecell::CloneCell,
|
||||
xwayland::XWaylandEvent,
|
||||
},
|
||||
|
|
@ -58,6 +58,15 @@ impl SurfaceExt for XSurface {
|
|||
}
|
||||
}
|
||||
|
||||
fn focus_node(&self) -> Option<Rc<dyn Node>> {
|
||||
if let Some(xwindow) = self.xwindow.get() {
|
||||
if xwindow.tl_accepts_keyboard_focus() {
|
||||
return Some(xwindow.x.surface.clone());
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
fn into_xsurface(self: Rc<Self>) -> Option<Rc<XSurface>> {
|
||||
Some(self)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue