Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWhen the Servo window gains focus, it should update the mouse coordinate #11130
Comments
|
In addition, a |
That will happen automatically. When I'm talking about mousemove, I'm talking about |
|
If someone can tell me how to get the mouse coordinates from a /cc @pcwalton |
|
We get a |
|
When a Firefox window is unfocused, the chrome still get mouse events. I think this is done with NSTrackingArea:
|
|
First thing first, a click should not rely on the previous mousemove coordinate, but on the actual coordinate. In Glutin: In In In Servo: In |
|
@paulrouget |
|
@mrmiywj Have at it! |
|
@mrmiywj Have you made any progress on this? |
|
@jdm |
|
@paulrouget |
|
@mrmiywj Yes. I think the proper way of doing it is what I described here: #11130 (comment) - that would partially address this issue. |
|
@paulrouget |
This should not a be a problem. |
|
@paulrouget |
return coordinates in MouseInput events Return mouse coordinates in MouseInput event. Due to this [servo issue](servo/servo#11130) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/97) <!-- Reviewable:end -->
|
@mrmiywj thanks for landing the first part. Now we need a glutin update in Servo with the changes I'm describing in the second part of #11130 (comment) |
Large framerate improvement in browser.html. This takes the Glutin upgrade intended for servo#11130 but does not address the underlying issue. A FIXME has been added.
Update Glutin to pick up borderless window performance fixes on Mac. Large framerate improvement in browser.html. This takes the Glutin upgrade intended for #11130 but does not address the underlying issue. A FIXME has been added. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11940) <!-- Reviewable:end -->
Large framerate improvement in browser.html. This takes the Glutin upgrade intended for servo#11130 but does not address the underlying issue. A FIXME has been added.
Update Glutin to pick up borderless window performance fixes on Mac. Large framerate improvement in browser.html. This takes the Glutin upgrade intended for #11130 but does not address the underlying issue. A FIXME has been added. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11940) <!-- Reviewable:end -->
Large framerate improvement in browser.html. This takes the Glutin upgrade intended for servo#11130 but does not address the underlying issue. A FIXME has been added.
Update Glutin to pick up borderless window performance fixes on Mac. Updated cocoa to unblock servo-glutin from being updated on cef. > Large framerate improvement in browser.html. > > This takes the Glutin upgrade intended for #11130 but does not address > the underlying issue. A FIXME has been added. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11979) <!-- Reviewable:end -->
…KiChjang when window gains focus, update mouse coordinate <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11130 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because these cannot be tested automated. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11794) <!-- Reviewable:end -->
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_posis updated. Then Servo loses focus. User moves the mouse. When Servo gains focus, the mouse is likely not atmouse_posanymore. That means:mouseoveris not triggered and:hoverstyles are not applied for element below the mouseWe should update
mouse_poswhen 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.