Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly set event.buttons value on mousemove #24709

Merged
merged 1 commit into from Nov 12, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Properly set event.buttons value on mousemove

  • Loading branch information
paulrouget committed Nov 11, 2019
commit 42ee1a86f6b228fc7b6eb310fecd0a70fe95fb2a
@@ -779,11 +779,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
let results = self.hit_test_at_point(cursor);
if let Some(item) = results.items.first() {
let node_address = Some(UntrustedNodeAddress(item.tag.0 as *const c_void));
let event = MouseMoveEvent(
Some(item.point_in_viewport.to_untyped()),
node_address,
MouseButton::Left as u16,
);
let event = MouseMoveEvent(Some(item.point_in_viewport.to_untyped()), node_address, 0);
let pipeline_id = PipelineId::from_webrender(item.pipeline);
let msg = ConstellationMsg::ForwardEvent(pipeline_id, event);
if let Err(e) = self.constellation_chan.send(msg) {
@@ -2286,6 +2286,10 @@ where
_ => event,
};

if let MouseButtonEvent(MouseEventType::Click, ..) = event {
self.pressed_mouse_buttons = 0;
}

let msg = ConstellationControlMsg::SendEvent(destination_pipeline_id, event);
let result = match self.pipelines.get(&destination_pipeline_id) {
None => {
@@ -159,6 +159,7 @@ void ServoControl::OnSurfacePointerMoved(
auto point = e.GetCurrentPoint(Panel());
auto x = point.Position().X * mDPI;
auto y = point.Position().Y * mDPI;
e.Handled(true);
RunOnGLThread([=] { mServo->MouseMove(x, y); });
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.