Add mouse hover tracking across the Servo input pipeline
Without continuous MouseMove events, Servo never updates hover state: no cursor changes over links, no :hover CSS effects, no mouseenter JavaScript events. The web page appears completely non-interactive. Track mouse position from GPUI on_mouse_move through the full IPC pipeline to Servo. Hover position is included with each ensure request so Servo updates hover state at frame rate (~60fps).
This commit is contained in:
@@ -6,6 +6,10 @@ use servo::{
|
||||
|
||||
use crate::keyboard::key_and_code_for_character;
|
||||
|
||||
pub(super) fn send_mouse_hover(webview: &WebView, x: u32, y: u32) {
|
||||
webview.notify_input_event(InputEvent::MouseMove(MouseMoveEvent::new(point(x, y))));
|
||||
}
|
||||
|
||||
pub(super) fn send_mouse_click(webview: &WebView, x: u32, y: u32) {
|
||||
let point = point(x, y);
|
||||
webview.notify_input_event(InputEvent::MouseMove(MouseMoveEvent::new(point)));
|
||||
|
||||
Reference in New Issue
Block a user