-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
When the Servo window gains focus, it should update the mouse coordinate #11130
Copy link
Copy link
Closed
Labels
A-gfx/compositingC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueC-has-open-prThere is a PR open that resolves the issueThere is a PR open that resolves the issueE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.P-macAny version of MacOSAny version of MacOS
Description
This is important for browserhtml. We need this to build automated tests.
in ports/glutin, the mouse coordinate is updated when receiving a glutin mousemove event.
When Servo starts, as the mouse moves, mouse_pos is updated. Then Servo loses focus. User moves the mouse. When Servo gains focus, the mouse is likely not at mouse_pos anymore. That means:
mouseoveris not triggered and:hoverstyles are not applied for element below the mouse- if a click occurs before the mouse is moved, the clicked is triggered for the element that was under the latest known coordinate (right before losing focus)
We should update mouse_pos when gaining focus, and fire a mousemove event if it changed.
There is a Focused(bool) glutin event, but it doesn't come with new mouse coordinates.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-gfx/compositingC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueC-has-open-prThere is a PR open that resolves the issueThere is a PR open that resolves the issueE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.P-macAny version of MacOSAny version of MacOS