Skip to content

Commit

Permalink
Send cursor position when scrolling (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnschulze authored Oct 8, 2024
1 parent 15ae793 commit c172880
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions windows/webview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -636,18 +636,14 @@ void Webview::SendScroll(double delta, bool horizontal) {

auto offset = static_cast<short>(delta * kScrollMultiplier);

POINT point;
point.x = 0;
point.y = 0;

if (horizontal) {
composition_controller_->SendMouseInput(
COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL, virtual_keys_.state(),
offset, point);
offset, last_cursor_pos_);
} else {
composition_controller_->SendMouseInput(COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL,
virtual_keys_.state(), offset,
point);
last_cursor_pos_);
}
}

Expand Down

0 comments on commit c172880

Please sign in to comment.