1
0
Fork 0
forked from wry/wry

autocommit 2022-05-01 21:44:09 CEST

This commit is contained in:
Julian Orth 2022-05-01 21:44:09 +02:00
parent cca3850800
commit 04580c4aeb
38 changed files with 815 additions and 124 deletions

View file

@ -149,6 +149,13 @@ impl NodeSeatState {
self.destroy_node2(node, false);
}
}
pub fn on_seat_remove(&self, seat: &WlSeatGlobal) {
self.kb_foci.remove(&seat.id);
self.pointer_foci.remove(&seat.id);
self.dnd_targets.remove(&seat.id);
self.pointer_grabs.remove(&seat.id);
}
}
impl WlSeatGlobal {

View file

@ -32,6 +32,10 @@ impl KbOwnerHolder {
pub fn set_kb_node(&self, seat: &Rc<WlSeatGlobal>, node: Rc<dyn Node>) {
self.owner.get().set_kb_node(seat, node);
}
pub fn clear(&self) {
self.owner.set(self.default.clone());
}
}
struct DefaultKbOwner;

View file

@ -115,6 +115,10 @@ impl PointerOwnerHolder {
pub fn remove_dnd_icon(&self) {
self.owner.get().remove_dnd_icon()
}
pub fn clear(&self) {
self.owner.set(self.default.clone());
}
}
trait PointerOwner {