1
0
Fork 0
forked from wry/wry

tree: make surface visibility tracking more robust

This commit is contained in:
Julian Orth 2024-03-29 20:07:28 +01:00
parent be0935c8dd
commit ba98103233
26 changed files with 313 additions and 144 deletions

View file

@ -981,6 +981,20 @@ impl WlSeatGlobal {
pub fn last_input(&self) -> u64 {
self.last_input_usec.get()
}
pub fn set_visible(&self, visible: bool) {
if let Some(cursor) = self.cursor.get() {
cursor.set_visible(visible);
}
if let Some(icon) = self.dnd_icon() {
icon.set_visible(visible);
}
if let Some(tl_drag) = self.toplevel_drag() {
if let Some(tl) = tl_drag.toplevel.get() {
tl.tl_set_visible(visible);
}
}
}
}
global_base!(WlSeatGlobal, WlSeat, WlSeatError);