Instantly share code, notes, and snippets.

Embed
What would you like to do?
Xournal Patch that Prevents Pen Streaks on a Surface 3
diff -x .git -Naur xournal/src/xo-paint.c xournal_b/src/xo-paint.c
--- xournal/src/xo-paint.c 2017-01-12 16:59:15.343353729 -0600
+++ xournal_b/src/xo-paint.c 2017-01-12 16:57:55.733350742 -0600
@@ -277,6 +277,8 @@
else {
if (hypot(pt[0]-pt[2], pt[1]-pt[3]) < PIXEL_MOTION_THRESHOLD/ui.zoom)
return; // not a meaningful motion
+ if (hypot(pt[0]-pt[2], pt[1]-pt[3]) > 100)
+ return; // not a meaningful motion
ui.cur_path.num_points++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment