1
0
Fork 0
forked from wry/wry

all: implement damage tracking

This commit is contained in:
Julian Orth 2024-07-10 19:58:17 +02:00
parent 76a3c50560
commit bb66abb817
28 changed files with 473 additions and 82 deletions

View file

@ -60,6 +60,16 @@ impl CursorSurface {
pub fn update_hardware_cursor(&self) {
self.user.update_hardware_cursor();
}
pub fn needs_damage_tracking(&self) -> bool {
self.user.software_cursor()
}
pub fn surface_position(&self) -> (i32, i32) {
let (x, y) = self.user.position();
let (dx, dy) = self.hotspot.get();
(x.to_int() - dx, y.to_int() - dy)
}
}
impl Cursor for CursorSurface {