Denis> Hi Daniel,
 >> The main problem is windows. In linux it is simply called "touch". But
 >> in windows (at least under gtk2) the touch is part of the core
 >> pointer. I guess it means that in windows there are not 3, but 2
 >> different devices (it might be gtk or windows, I don't know).

 Denis> Given this and the code

 >> if (ui.toolno[mapping] == TOOL_HAND ||
 >> (ui.touch_as_handtool && strstr(event->device->name, DEVICE_FOR_TOUCH) != 
 >> NULL)) {
 >> 
 >> and DEVICE_FOR_TOUCH is a constant.

 Denis> I assume in windows DEVICE_FOR_TOUCH is something like "core" -- so not 
 Denis> only the touchscreen but also mice, trackpoints, and other non-wacom 
 Denis> devices would also map to the hand. Fine by me (though some users might 
 Denis> object).

 Denis> But what's potentially problematic is that the wacom pen noramlly sends 
 Denis> two sets of events, one as a wacom pen and one as core. (At least, 
 Denis> that's how I'm used to it being in linux, and I think it's how it 
always 
 Denis> happens, so that non-xinput-aware applications always receive the core 
 Denis> event anyway).  I am not aware that the order in which these events are 
 Denis> received by xournal is well-specified, even though in practice the 
 Denis> device event nowadays seems to arrive first. If that's indeed the case, 
 Denis> then you're fine; if the core event comes first then you've made 
 Denis> everything act as a hand tool. See the code fragment

   if (ui.cur_item_type == ITEM_STROKE && ui.is_corestroke && !is_core &&
       ui.cur_path.num_points == 1) {
       // Xorg 7.3+ sent core event before XInput event: fix initial point
     ui.is_corestroke = FALSE;
     ui.stroke_device = event->device;
     get_pointer_coords((GdkEvent *)event, ui.cur_path.coords);
   }

Hi Denis,

I debugged events on my laptop (linux) and my tablet (Windows).

In both cases I only get one event, and not two. 

But as I mentioned before, in Linux is works wonderfully.

In Windows, it works before the stylus touches the canvas. After that,
no event from the core-pointer (the hand) reaches
on_canvas_button_press_event

I don't understand why. I can only blame it on a bug on gtk2/windows.

Gtk3 will need this function to be rewritten, by the way. At least under
windows, both the stylus and the touch are core pointers, but there must
be a way to distinguish between them (need investigation).



--
Daniel M. German                  "The "people" who exercise the
                                   power, are not always the same
                                   people with those over whom
   John Stuart Mill ->             it is exercised."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Xournal-devel mailing list
Xournal-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xournal-devel

Reply via email to