mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
98816b753c
commit
205b97d5ed
2 changed files with 11 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue