We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fd19a6 commit 8c753aaCopy full SHA for 8c753aa
src/cdp/domains/input.zig
@@ -57,8 +57,8 @@ fn dispatchMouseEvent(cmd: anytype) !void {
57
const page = bc.session.currentPage() orelse return;
58
59
const mouse_event = Page.MouseEvent{
60
- .x = @intFromFloat(params.x), // Decimal pixel values are not understood by netsurf or out rendered
61
- .y = @intFromFloat(params.y), // So we convert them once at intake here
+ .x = @intFromFloat(@floor(params.x)), // Decimal pixel values are not understood by netsurf or our rendered
+ .y = @intFromFloat(@floor(params.y)), // So we convert them once at intake here. Using floor such that -0.5 becomes -1 and 0.5 becomes 0.
62
.type = switch (params.type) {
63
.mousePressed => .pressed,
64
.mouseReleased => .released,
0 commit comments