1
0
Fork 0
forked from wry/wry

tree: unify toplevel active changes

This commit is contained in:
Julian Orth 2024-03-04 13:49:05 +01:00
parent 3dfdc26592
commit 2445226cbe
5 changed files with 32 additions and 26 deletions

View file

@ -322,6 +322,10 @@ impl Node for Xwindow {
seat.focus_toplevel(self.clone());
}
fn node_active_changed(&self, active: bool) {
self.toplevel_data.update_self_active(self, active);
}
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult {
let rect = self.x.surface.buffer_abs_pos.get();
if x < rect.width() && y < rect.height() {

View file

@ -511,6 +511,10 @@ impl Node for XdgToplevel {
seat.focus_toplevel(self.clone());
}
fn node_active_changed(&self, active: bool) {
self.toplevel_data.update_self_active(self, active);
}
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult {
self.xdg.find_tree_at(x, y, tree)
}