Skip to content

Instantly share code, notes, and snippets.

@wasnotrice
Created August 26, 2011 21:04
Show Gist options
  • Select an option

  • Save wasnotrice/1174440 to your computer and use it in GitHub Desktop.

Select an option

Save wasnotrice/1174440 to your computer and use it in GitHub Desktop.
diff --git a/shoes/native/cocoa.m b/shoes/native/cocoa.m
index 91f2ef7..4155461 100644
--- a/shoes/native/cocoa.m
+++ b/shoes/native/cocoa.m
@@ -116,7 +116,7 @@
Data_Get_Struct(app, shoes_app, a);
Data_Get_Struct(a->canvas, shoes_canvas, canvas);
if (type == s_motion)
- shoes_app_motion(a, p.x, (canvas->height - p.y) + canvas->slot->scrolly);
+ shoes_app_motion(a, (int)round(p.x), (canvas->height - (int)round(p.y)) + canvas->slot->scrolly);
else if (type == s_click)
shoes_app_click(a, b, p.x, (canvas->height - p.y) + canvas->slot->scrolly);
else if (type == s_release)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment