cursor: ensure software cursors are drawn if some outputs don't have HC
This commit is contained in:
parent
dc9a3c20ea
commit
31a045e01b
5 changed files with 35 additions and 10 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue