compositing: Move cursor_pos member and update it in update_cursor() (#35934)

Previously a member of IOCompositor, the `cursor_pos` DevicePoint did not reflect
the true position of the cursor. This caused flickering on mouse hover,
see [issue #35875.] The value of `cursor_pos` within IOCompositor
was always (x=0, y=0) regardless of the true cursor position
(it was never updated, must be a bug or an oversight?).

Moving `cursor_pos` to `ServoRenderer`, updating `cursor_pos` on `dispatch_input_event()`,
and storing cursor position in `ServoRenderer` through method `update_cursor()` fixes
the flickering previously observed.

Signed-off-by: devgev <leifminfagel@gmail.com>
This commit is contained in:
Simon B / GrausamkeitEnjoyer / God's Eye View Developer 2025-03-13 03:03:46 +01:00 committed by GitHub
parent 98816b753c
commit 205b97d5ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 8 deletions

View file

@ -285,7 +285,7 @@ impl WebView {
return;
};
self.global.borrow_mut().update_cursor(&result);
self.global.borrow_mut().update_cursor(point, &result);
if let Err(error) =
self.global