Skip to content

Commit 626e884

Browse files
committed
fix: Updated vxfw.App to support the new vaxis.Mouse negative position changes.
- Added `@intCast()` where appropriate to handle the new negative positions.
1 parent 19b2634 commit 626e884

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/vxfw/App.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ const MouseHandler = struct {
488488
ctx.phase = .capturing;
489489
for (hits.items) |item| {
490490
var m_local = mouse;
491-
m_local.col = item.local.col;
492-
m_local.row = item.local.row;
491+
m_local.col = @intCast(item.local.col);
492+
m_local.row = @intCast(item.local.row);
493493
try item.widget.captureEvent(ctx, .{ .mouse = m_local });
494494
try app.handleCommand(&ctx.cmds);
495495

@@ -500,8 +500,8 @@ const MouseHandler = struct {
500500
ctx.phase = .at_target;
501501
{
502502
var m_local = mouse;
503-
m_local.col = target.local.col;
504-
m_local.row = target.local.row;
503+
m_local.col = @intCast(target.local.col);
504+
m_local.row = @intCast(target.local.row);
505505
try target.widget.handleEvent(ctx, .{ .mouse = m_local });
506506
try app.handleCommand(&ctx.cmds);
507507

@@ -512,8 +512,8 @@ const MouseHandler = struct {
512512
ctx.phase = .bubbling;
513513
while (hits.pop()) |item| {
514514
var m_local = mouse;
515-
m_local.col = item.local.col;
516-
m_local.row = item.local.row;
515+
m_local.col = @intCast(item.local.col);
516+
m_local.row = @intCast(item.local.row);
517517
try item.widget.handleEvent(ctx, .{ .mouse = m_local });
518518
try app.handleCommand(&ctx.cmds);
519519

0 commit comments

Comments
 (0)