Skip to content

Instantly share code, notes, and snippets.

@chadvoegele
Created January 12, 2017 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadvoegele/ab34aa7fb7cd2c1d4ce644fd67c39440 to your computer and use it in GitHub Desktop.
Save chadvoegele/ab34aa7fb7cd2c1d4ce644fd67c39440 to your computer and use it in GitHub Desktop.
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