1
0
Fork 0
forked from wry/wry

cursor: ensure software cursors are drawn if some outputs don't have HC

This commit is contained in:
Julian Orth 2025-07-27 12:11:19 +02:00
parent dc9a3c20ea
commit 31a045e01b
5 changed files with 35 additions and 10 deletions

View file

@ -1433,6 +1433,19 @@ impl OutputNode {
.handle_tearing_mode_change(mode.to_config());
}
}
pub fn set_hardware_cursor(&self, hc: Option<Rc<dyn HardwareCursor>>) {
let is_none = hc.is_none();
let old = self.hardware_cursor.set(hc);
let was_none = old.is_none();
if was_none != is_none {
if is_none {
self.state.outputs_without_hc.fetch_add(1);
} else {
self.state.outputs_without_hc.fetch_sub(1);
}
}
}
}
pub struct OutputTitle {