Skip to content

Commit

Permalink
Document potentially negative mouse coordinates.
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Sep 30, 2023
1 parent 0c49eee commit 1005eaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/syscalls.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
],
"permission": "window_display",
"const_idx": 11,
"description": "Register a callback for mouse movement."
"description": "Register a callback for mouse movement. Mouse x/y coordinates are relative to the top-left corner of the window and may be negative if outside of the window."
},
{
"name": "window_on_mousedown",
Expand Down
2 changes: 1 addition & 1 deletion ncc/examples/paint.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void draw_palette()
}

// Mouve movement callback
void mousemove(u64 window_id, u64 new_x, u64 new_y)
void mousemove(u64 window_id, int new_x, int new_y)
{
if (drawing)
{
Expand Down

0 comments on commit 1005eaa

Please sign in to comment.