Hello,

I am kind of new to Xournal and OS-contribution in general,  but today
I feel the urge to share a trivial patch that makes "Use Touch Screen
as Hand Tool" usable for my machine.

On my Sony Vaio Duo, the touchscreen is named "N-trig DuoSense" and
the pen "N-trig DuoSense Pen", which confuses the current check. I
guess this should have used a string comparison since there is now an
UI to pick the exact device. So here we go:

---
 src/xo-callbacks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xo-callbacks.c b/src/xo-callbacks.c
index cb1349d..23f48e1 100755
--- a/src/xo-callbacks.c
+++ b/src/xo-callbacks.c
@@ -2439,7 +2439,7 @@ on_canvas_button_press_event
(GtkWidget       *widget,

   if (!finite_sized(event->x) || !finite_sized(event->y)) return
FALSE; // Xorg 7.3 bug

-  is_touch = (strstr(event->device->name, ui.device_for_touch) !=
NULL) && ui.use_xinput;
+  is_touch = (strcmp(event->device->name, ui.device_for_touch) == 0)
&& ui.use_xinput;
   if (is_touch && ui.pen_disables_touch && ui.in_proximity) return FALSE;

   if (is_touch && is_core && ui.cur_item_type == ITEM_TEXT &&
ui.touch_as_handtool && ui.in_proximity) return FALSE; // workaround
for touch = core as handtool
-- 


Greetings,

Marcel Schneider

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Xournal-devel mailing list
Xournal-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xournal-devel

Reply via email to