Using a Wacom PTH-451 with 0.16.2 windows client, scrolling seems to be "over-exuberant" - that is, whether the pen is moved just a few pixels or relatively quickly, the scrolling events seem to always behave as if moving the pen quickly (making fine/small motion scrolling nearly impossible, or at least highly difficult).
Moving the pen horizontally also seems to not be recognized or to allow for horizontal scrolling, though, as mentioned above, the slightest y-axis motion triggers rapid scrolling vertically.
Running with -d mouse
with a mouse while scrolling vs. with the wacom pen... we collected some logs.
Scrolling with the mouse:
do_scroll_event direction=<enum GDK_SCROLL_UP of type GdkScrollDirection>, button_mapping=4 pointer_modifiers(<gtk.gdk.Event at 0xa4cca10: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_UP>)=((588, 688), ['mod2'], []) _button_action(4, <gtk.gdk.Event at 0xa4cca10: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_UP>, True) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa4cca10: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_UP>)=((588, 688), ['mod2'], []) _button_action(4, <gtk.gdk.Event at 0xa4cca10: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_UP>, False) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa4cc9e0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc9e0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa4cc9e0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc9e0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa4cc9b0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc9b0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa4cc9b0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc9b0: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa4cc8a8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc8a8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa4cc8a8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc8a8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa4cc9f8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc9f8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa4cc9f8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>)=((588, 688), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa4cc9f8: GDK_SCROLL x=583.00, y=643.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=3, pointer=(588, 688), modifiers=['mod2'], buttons=[]
Vs. with the wacom pen:
do_scroll_event direction=<enum GDK_SCROLL_RIGHT of type GdkScrollDirection>, button_mapping=7 pointer_modifiers(<gtk.gdk.Event at 0xa239c20: GDK_SCROLL x=797.00, y=332.00, direction=GDK_SCROLL_RIGHT>)=((802, 377), ['mod2'], []) _button_action(7, <gtk.gdk.Event at 0xa239c20: GDK_SCROLL x=797.00, y=332.00, direction=GDK_SCROLL_RIGHT>, True) wid=3 / focus=None, pointer=(802, 377), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239c20: GDK_SCROLL x=797.00, y=332.00, direction=GDK_SCROLL_RIGHT>)=((802, 377), ['mod2'], []) _button_action(7, <gtk.gdk.Event at 0xa239c20: GDK_SCROLL x=797.00, y=332.00, direction=GDK_SCROLL_RIGHT>, False) wid=3 / focus=None, pointer=(802, 377), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239c20: GDK_MOTION_NOTIFY x=796.00, y=332.00>)=((801, 378), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239c20: GDK_MOTION_NOTIFY x=796.00, y=332.00>) wid=3 / focus=None, pointer=(801, 378), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239d28: GDK_MOTION_NOTIFY x=796.00, y=331.00>)=((801, 377), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239d28: GDK_MOTION_NOTIFY x=796.00, y=331.00>) wid=3 / focus=None, pointer=(801, 377), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_RIGHT of type GdkScrollDirection>, button_mapping=7 pointer_modifiers(<gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=331.00, direction=GDK_SCROLL_RIGHT>)=((801, 376), ['mod2'], []) _button_action(7, <gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=331.00, direction=GDK_SCROLL_RIGHT>, True) wid=3 / focus=None, pointer=(801, 376), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=331.00, direction=GDK_SCROLL_RIGHT>)=((801, 376), ['mod2'], []) _button_action(7, <gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=331.00, direction=GDK_SCROLL_RIGHT>, False) wid=3 / focus=None, pointer=(801, 376), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239d10: GDK_MOTION_NOTIFY x=796.00, y=330.00>)=((801, 376), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239d10: GDK_MOTION_NOTIFY x=796.00, y=330.00>) wid=3 / focus=None, pointer=(801, 376), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=330.00, direction=GDK_SCROLL_DOWN>)=((801, 375), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=330.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=None, pointer=(801, 375), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=330.00, direction=GDK_SCROLL_DOWN>)=((801, 375), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa239d40: GDK_SCROLL x=796.00, y=330.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=None, pointer=(801, 375), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239d40: GDK_MOTION_NOTIFY x=796.00, y=329.00>)=((801, 375), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239d40: GDK_MOTION_NOTIFY x=796.00, y=329.00>) wid=3 / focus=None, pointer=(801, 375), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239da0: GDK_MOTION_NOTIFY x=795.00, y=329.00>)=((800, 375), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239da0: GDK_MOTION_NOTIFY x=795.00, y=329.00>) wid=3 / focus=None, pointer=(800, 375), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_RIGHT of type GdkScrollDirection>, button_mapping=7 pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=329.00, direction=GDK_SCROLL_RIGHT>)=((800, 374), ['mod2'], []) _button_action(7, <gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=329.00, direction=GDK_SCROLL_RIGHT>, True) wid=3 / focus=None, pointer=(800, 374), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=329.00, direction=GDK_SCROLL_RIGHT>)=((800, 374), ['mod2'], []) _button_action(7, <gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=329.00, direction=GDK_SCROLL_RIGHT>, False) wid=3 / focus=None, pointer=(800, 374), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239da0: GDK_MOTION_NOTIFY x=795.00, y=328.00>)=((800, 374), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239da0: GDK_MOTION_NOTIFY x=795.00, y=328.00>) wid=3 / focus=None, pointer=(800, 374), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=328.00, direction=GDK_SCROLL_DOWN>)=((800, 373), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=328.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=None, pointer=(800, 373), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=328.00, direction=GDK_SCROLL_DOWN>)=((800, 373), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=328.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=None, pointer=(800, 373), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_MOTION_NOTIFY x=795.00, y=327.00>)=((800, 373), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239f68: GDK_MOTION_NOTIFY x=795.00, y=327.00>) wid=3 / focus=None, pointer=(800, 373), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239fc8: GDK_MOTION_NOTIFY x=795.00, y=326.00>)=((800, 372), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239fc8: GDK_MOTION_NOTIFY x=795.00, y=326.00>) wid=3 / focus=None, pointer=(800, 372), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=326.00, direction=GDK_SCROLL_DOWN>)=((800, 371), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=326.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=None, pointer=(800, 371), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=326.00, direction=GDK_SCROLL_DOWN>)=((800, 371), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 0xa239f68: GDK_SCROLL x=795.00, y=326.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=None, pointer=(800, 371), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 0xa239e18: GDK_MOTION_NOTIFY x=795.00, y=325.00>)=((800, 371), ['mod2'], []) do_motion_notify_event(<gtk.gdk.Event at 0xa239e18: GDK_MOTION_NOTIFY x=795.00, y=325.00>) wid=3 / focus=None, pointer=(800, 371), modifiers=['mod2'], buttons=[] do_scroll_event direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5
And... trying for a time to scroll horizontally (and eventually accidentally managing to scroll a pixel vertically):
2016-02-16 11:50:59,609 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_SCROLL x=162.00, y=293.00, direction=GDK_SCROLL_UP>)=((970, 323), ['mod2'], []) 2016-02-16 11:50:59,609 _button_action(4, <gtk.gdk.Event at 04C77980: GDK_SCROLL x=162.00, y=293.00, direction=GDK_SCROLL_UP>, True) wid=3 / focus=3, pointer=(970, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,609 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_SCROLL x=162.00, y=293.00, direction=GDK_SCROLL_UP>)=((970, 323), ['mod2'], []) 2016-02-16 11:50:59,609 _button_action(4, <gtk.gdk.Event at 04C77980: GDK_SCROLL x=162.00, y=293.00, direction=GDK_SCROLL_UP>, False) wid=3 / focus=3, pointer=(970, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,625 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=163.00, y=293.00>)=((971, 323), ['mod2'], []) 2016-02-16 11:50:59,625 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=163.00, y=293.00>) wid=3 / focus=3, pointer=(971, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,641 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=164.00, y=293.00>)=((972, 323), ['mod2'], []) 2016-02-16 11:50:59,641 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=164.00, y=293.00>) wid=3 / focus=3, pointer=(972, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,673 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=165.00, y=293.00>)=((973, 323), ['mod2'], []) 2016-02-16 11:50:59,673 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=165.00, y=293.00>) wid=3 / focus=3, pointer=(973, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,687 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=166.00, y=293.00>)=((974, 323), ['mod2'], []) 2016-02-16 11:50:59,687 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=166.00, y=293.00>) wid=3 / focus=3, pointer=(974, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,703 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=167.00, y=293.00>)=((975, 323), ['mod2'], []) 2016-02-16 11:50:59,703 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=167.00, y=293.00>) wid=3 / focus=3, pointer=(975, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,720 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=168.00, y=293.00>)=((976, 323), ['mod2'], []) 2016-02-16 11:50:59,720 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=168.00, y=293.00>) wid=3 / focus=3, pointer=(976, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,734 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=169.00, y=293.00>)=((977, 323), ['mod2'], []) 2016-02-16 11:50:59,734 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=169.00, y=293.00>) wid=3 / focus=3, pointer=(977, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,750 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=170.00, y=293.00>)=((978, 323), ['mod2'], []) 2016-02-16 11:50:59,750 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=170.00, y=293.00>) wid=3 / focus=3, pointer=(978, 323), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,750 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=170.00, y=294.00>)=((978, 324), ['mod2'], []) 2016-02-16 11:50:59,750 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=170.00, y=294.00>) wid=3 / focus=3, pointer=(978, 324), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,782 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=171.00, y=294.00>)=((979, 324), ['mod2'], []) 2016-02-16 11:50:59,782 do_motion_notify_event(<gtk.gdk.Event at 04C77980: GDK_MOTION_NOTIFY x=171.00, y=294.00>) wid=3 / focus=3, pointer=(979, 324), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,798 do_scroll_event direction=<enum GDK_SCROLL_UP of type GdkScrollDirection>, button_mapping=4 2016-02-16 11:50:59,798 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_SCROLL x=171.00, y=294.00, direction=GDK_SCROLL_UP>)=((979, 324), ['mod2'], []) 2016-02-16 11:50:59,798 _button_action(4, <gtk.gdk.Event at 04C77980: GDK_SCROLL x=171.00, y=294.00, direction=GDK_SCROLL_UP>, True) wid=3 / focus=3, pointer=(979, 324), modifiers=['mod2'], buttons=[] 2016-02-16 11:50:59,798 pointer_modifiers(<gtk.gdk.Event at 04C77980: GDK_SCROLL x=171.00, y=294.00, direction=GDK_SCROLL_UP>)=((979, 324), ['mod2'], []) 2016-02-16 11:50:59,798 _button_action(4, <gtk.gdk.Event at 04C77980: GDK_SCROLL x=171.00, y=294.00, direction=GDK_SCROLL_UP>, False) wid=3 / focus=3, pointer=(979, 324), modifiers=['mod2'], buttons=[]
GTK2 does not tell us how much to scroll by, only that the event occurred. GTK3 might (#640) if it was usable, but then again there's no guarantee it will also do that on all platforms (ie: win32). (judging by the wrapped around log output, I assume this is a win32 client?)
So instead, maybe we can detect when we are dealing with a tablet device and adjust accordingly. Ideally we would send the list of devices to the server, and forward events together with the device-id they belong to, the server could then reproduce the exact same type of events, including the device type. But for the time being, we can probably just rate-limit the events coming from a tablet client-side.
Please post the output of GTK_info.exe
which should contain a list of input devices. r12003 adds more details to the input device info data shown.
This is what I now get on Linux (with the "keys" trimmed):
* device[0] : Virtual core XTEST pointer * device[0].axes : ((1, 0.0, 0.0), (2, 0.0, 0.0)) * device[0].has_cursor : False * device[0].keys : [] * device[0].mode : DISABLED * device[0].num_axes : 2 * device[0].num_keys : 0 * device[0].source : MOUSE * device[1] : Microsoft Comfort Curve Keyboard 2000 * device[1].axes : ((1, 0.0, 0.0), (2, 0.0, 0.0), (3, 0.0, 1.0), (4, -1.0, 1.0)) * device[1].has_cursor : False * device[1].keys : [(0, []), ..., (0, [])] * device[1].mode : DISABLED * device[1].num_axes : 4 * device[1].num_keys : 248 * device[1].source : MOUSE * device[2] : Logitech M705 * device[2].axes : ((1, 0.0, 0.0), (2, 0.0, 0.0), (3, 0.0, 1.0), (4, -1.0, 1.0)) * device[2].has_cursor : False * device[2].keys : [] * device[2].mode : DISABLED * device[2].num_axes : 4 * device[2].num_keys : 0 * device[2].source : MOUSE * device[3] : Core Pointer * device[3].axes : ((1, 0.0, 0.0), (2, 0.0, 0.0)) * device[3].has_cursor : True * device[3].keys : [] * device[3].mode : SCREEN * device[3].num_axes : 2 * device[3].num_keys : 0 * device[3].source : MOUSE
If you do see a differentiator in there for the table device, then please also verify that the tablet events are correctly tagged when moving / clicking / scrolling with -d mouse
(requires r12004 or later).
Downloaded the r12205.exe Windows client and put it on our Windows 7 testbench machine. I ran the GTK_Info.exe
and piped it into a .txt that I will attach to this ticket.
Requested info
As per comment:1: If you do see a differentiator in there for the tablet device, then please also verify that the tablet events are correctly tagged when moving / clicking / scrolling with -d mouse
D'oh! Missed that comment while surfing through all the logs and comments.
Anyways, I wrangled Jake to do a quick test:
-d mouse
Each step had at least one FULL second pause between them, that way the logs should be easier to read. Also, we used GIMP - and the pen/drawing works great, actually. Although it didn't recognize the eraser side. (not sure if it would, might be worth testing installing GIMP to a machine with the Wacom plugged in directly to see if it recognizes the eraser - but that's super low priority for us at least until the end of next week)
I piped the logs into a .txt, which I will attach to this ticket. Let me know if you need anything else.
Also, we played around a bit with scrolling and it looks like it will only recognize scrolling up and down. We did this test be zooming in on a large image of a bird and moved the pen in a circular motion while holding down the scroll button....and it only moved up and down. BUT, it did do it smoothly.
Output snippet (didn't pipe this one into a .txt):
2016-03-25 11:00:06,890 do_scroll_event device=Core Pointer, direction=<enum GDK_SCROLL_UP of type GdkScrollDirection>, button_mapping=4 2016-03-25 11:00:06,891 pointer_modifiers(<gtk.gdk.Event at 05755800: GDK_SCROLL x=683.00, y=515.00, direction=GDK_SCROLL_UP>)=((593, 476), ['mod2'], []) 2016-03-25 11:00:06,891 _button_action(4, <gtk.gdk.Event at 05755800: GDK_SCROLL x=683.00, y=515.00, direction=GDK_SCROLL_UP>, True) wid=17 / focus=17 , device=Core Pointer, pointer=(593, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,891 pointer_modifiers(<gtk.gdk.Event at 05755800: GDK_SCROLL x=683.00, y=515.00, direction=GDK_SCROLL_UP>)=((593, 476), ['mod2'], []) 2016-03-25 11:00:06,891 _button_action(4, <gtk.gdk.Event at 05755800: GDK_SCROLL x=683.00, y=515.00, direction=GDK_SCROLL_UP>, False) wid=17 / focus=1 7, device=Core Pointer, pointer=(593, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,892 pointer_modifiers(<gtk.gdk.Event at 05755800: GDK_MOTION_NOTIFY x=683.00, y=515.00>)=((593, 476), ['mod2'], []) 2016-03-25 11:00:06,892 do_motion_notify_event(<gtk.gdk.Event at 05755800: GDK_MOTION_NOTIFY x=683.00, y=515.00>) wid=17 / focus=17, device=Core Point er, pointer=(593, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,892 pointer_modifiers(<gtk.gdk.Event at 05755800: GDK_MOTION_NOTIFY x=684.00, y=515.00>)=((594, 476), ['mod2'], []) 2016-03-25 11:00:06,894 do_motion_notify_event(<gtk.gdk.Event at 05755800: GDK_MOTION_NOTIFY x=684.00, y=515.00>) wid=17 / focus=17, device=Core Point er, pointer=(594, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,907 pointer_modifiers(<gtk.gdk.Event at 05755D40: GDK_MOTION_NOTIFY x=686.00, y=515.00>)=((595, 476), ['mod2'], []) 2016-03-25 11:00:06,907 do_motion_notify_event(<gtk.gdk.Event at 05755D40: GDK_MOTION_NOTIFY x=686.00, y=515.00>) wid=17 / focus=17, device=Core Point er, pointer=(595, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,908 pointer_modifiers(<gtk.gdk.Event at 057553E0: GDK_MOTION_NOTIFY x=688.00, y=515.00>)=((597, 476), ['mod2'], []) 2016-03-25 11:00:06,908 do_motion_notify_event(<gtk.gdk.Event at 057553E0: GDK_MOTION_NOTIFY x=688.00, y=515.00>) wid=17 / focus=17, device=Core Point er, pointer=(597, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,917 pointer_modifiers(<gtk.gdk.Event at 057553E0: GDK_MOTION_NOTIFY x=690.00, y=515.00>)=((598, 476), ['mod2'], []) 2016-03-25 11:00:06,917 do_motion_notify_event(<gtk.gdk.Event at 057553E0: GDK_MOTION_NOTIFY x=690.00, y=515.00>) wid=17 / focus=17, device=Core Point er, pointer=(598, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,924 pointer_modifiers(<gtk.gdk.Event at 05755860: GDK_MOTION_NOTIFY x=692.00, y=515.00>)=((600, 476), ['mod2'], []) 2016-03-25 11:00:06,924 do_motion_notify_event(<gtk.gdk.Event at 05755860: GDK_MOTION_NOTIFY x=692.00, y=515.00>) wid=17 / focus=17, device=Core Point er, pointer=(600, 476), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,930 pointer_modifiers(<gtk.gdk.Event at 05755860: GDK_MOTION_NOTIFY x=694.00, y=513.00>)=((602, 474), ['mod2'], []) 2016-03-25 11:00:06,931 do_motion_notify_event(<gtk.gdk.Event at 05755860: GDK_MOTION_NOTIFY x=694.00, y=513.00>) wid=17 / focus=17, device=Core Point er, pointer=(602, 474), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,940 pointer_modifiers(<gtk.gdk.Event at 05755860: GDK_MOTION_NOTIFY x=697.00, y=512.00>)=((604, 474), ['mod2'], []) 2016-03-25 11:00:06,940 do_motion_notify_event(<gtk.gdk.Event at 05755860: GDK_MOTION_NOTIFY x=697.00, y=512.00>) wid=17 / focus=17, device=Core Point er, pointer=(604, 474), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,956 do_scroll_event device=Core Pointer, direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 2016-03-25 11:00:06,957 pointer_modifiers(<gtk.gdk.Event at 05755BD8: GDK_SCROLL x=699.00, y=510.00, direction=GDK_SCROLL_DOWN>)=((606, 472), ['mod2'] , []) 2016-03-25 11:00:06,957 _button_action(5, <gtk.gdk.Event at 05755BD8: GDK_SCROLL x=699.00, y=510.00, direction=GDK_SCROLL_DOWN>, True) wid=17 / focus= 17, device=Core Pointer, pointer=(606, 472), modifiers=['mod2'], buttons=[] 2016-03-25 11:00:06,957 pointer_modifiers(<gtk.gdk.Event at 05755BD8: GDK_SCROLL x=699.00, y=510.00, direction=GDK_SCROLL_DOWN>)=((606, 472), ['mod2'] , []) 2016-03-25 11:00:06,957 _button_action(5, <gtk.gdk.Event at 05755BD8: GDK_SCROLL x=699.00, y=510.00, direction=GDK_SCROLL_DOWN>, False) wid=17 / focus =17, device=Core Pointer, pointer=(606, 472), modifiers=['mod2'], buttons=[]
-d mouse test
What we really want are the scrolling events, as per the ticket description (do_scroll_event...
) more than the motion events. AFAICT, there is only one such event in all the latest log samples. (right at the end of the comment:4 above)
Sadly, it comes through the wrong device: device=Core Pointer
instead of the WACOM Tablet Pressure Stylus
or even the WACOM Tablet Eraser
device names found in the gtk info output you posted previously.
But having those scrolling events may be able to show us a pattern, if there is one - unlikely but still.
So I dug up the GTK source and found that no matter what device generated the event, the code does this:
case WM_MOUSEWHEEL: (...) event->scroll.device = _gdk_display->core_pointer;
It always uses the core pointer device... And it doesn't handle horizontal scrolling at all in 2.24.24 (the binary version we use), though it now does in the latest 2.24.30 release (for which we have no binaries.. because of #678)
I have added some extra win32 specific information to "Native_info.exe" in r12223, so we can at least attempt to honour the user's settings at some point. This is what I see on my VM without a tablet attached:
* mouse - buttons : 5 - drag - x : 4 - y : 4 - present : 1 - swap : 0 - vanish : True - wheel - chars : 3 - horizontal : 0 - lines : 3 - vertical : 1
Tells us mouse (THE mouse... since we don't handle raw input), has 5 buttons and both mouse wheels, scrolling by 3 lines/chars at a time (which is the default). @maxmylyn: what do you see with your tablet?
The big problem is that the "Core Pointer" is always present, so we can't just change behaviour when a tablet is detected because we don't know which one is actually used.
Some links:
Summary of the solutions I can think of:
For configuring the wheel scrolling rate server side, as per Changing mouse acceleration in Debian and Linux in general, the big problem is that the X11 virtual device we use does not have any wheel attributes:
$ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] $ xinput list-props "Virtual core XTEST pointer" Device 'Virtual core XTEST pointer': Device Enabled (114): 1 Coordinate Transformation Matrix (116): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 XTEST Device (224): 1
So we would probably have to use another virtual device driver. That's a lot of work I think:
Extra difficulty: applications also override this behaviour with their own "I know better" settings (sigh):
As for doing the same thing in the HTML5 client, I found some links:
r12230 adds support for the env var XPRA_WHEEL_DEBUG=1
to log extra wheel event information.
@maxmylyn: can you please post:
XPRA_WHEEL_DEBUG=1
messages
-d mouse
only for wheel events
Native_info.exe
output
Requested Native_Info
Upped client to r12255:
-d mouse
and the wheel debug logs in a sec.
Unfortunately I'm on a Windows machine so I'm not really sure how to trim the logs to just the wheel events.
For the -d mouse
and wheel debug:
Requested wheel debug file
new -d mouse - as requested
OK, the events do come through with varying distances rather than the round numbers we get for regular mouse events:
MOUSEWHEEL distance=-12.0, keys=0x0, x=849, y=613 MOUSEWHEEL distance=-111.0, keys=0x0, x=779, y=557 MOUSEWHEEL distance=-106.0, keys=0x0, x=753, y=496 MOUSEWHEEL distance=-135.0, keys=0x0, x=795, y=437
We just need to figure out if the distances reported are small enough to match what the tablet is meant to report. To convert to scroll events, the "distance" value must be divided by 120, then multiplied by mouse.wheel.lines
from native info. (or mouse.wheel.chars
for horizontal scrolling).
Please post the output of XPRA_WHEEL_DEBUG=1 xpra attach -d mouse
. Both debug flags enabled at the same time so we can see how the raw win32 events translate into the GTK events.
It would be nice to have:
Please also include the same action using the regular mouse, before or after the tablet events, so we can compare and maybe try to differentiate them.
If you give me those log samples with a description of the behaviour we would want to have, I hope we can cook those values into something useful.
same with horizontal scrolling - if that works at all
Horizontal scrolling does not work at this time at all. It only scrolls vertically; both with mice that have horizontal scrolling and the Wacom tablet.
requested scrolling and logs (-d mouse and XPRA_WHEEL_DEBUG=1)
requested scrolling and logs (-d mouse and XPRA_WHEEL_DEBUG=1)
Thanks for the logs, as expected the GTK code fires wheel events even for the slightest distance (the standard unit is "distance=120"):
MOUSEWHEEL distance=-2.0, keys=0x0, x=829, y=574 do_scroll_event device=Core Pointer, direction=<enum GDK_SCROLL_DOWN of type GdkScrollDirection>, button_mapping=5 pointer_modifiers(<gtk.gdk.Event at 058283C8: GDK_SCROLL x=401.00, y=493.00, direction=GDK_SCROLL_DOWN>)=((663, 459), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 058283C8: GDK_SCROLL x=401.00, y=493.00, direction=GDK_SCROLL_DOWN>, True) wid=3 / focus=3, device=Core Pointer, pointer=(663, 459), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 058283C8: GDK_SCROLL x=401.00, y=493.00, direction=GDK_SCROLL_DOWN>)=((663, 459), ['mod2'], []) _button_action(5, <gtk.gdk.Event at 058283C8: GDK_SCROLL x=401.00, y=493.00, direction=GDK_SCROLL_DOWN>, False) wid=3 / focus=3, device=Core Pointer, pointer=(663, 459), modifiers=['mod2'], buttons=[] pointer_modifiers(<gtk.gdk.Event at 058283C8: GDK_MOTION_NOTIFY x=400.00, y=493.00>)=((662, 459), ['mod2'], [])
So r12285 should "fix" this (see commit message for details): we will only send scroll events when we have accumulated enough distance.
I have tested this with a normal mouse and -d mouse
now shows:
mousewheel: orientation=vertical distance=-120.0, units=-1, new value=-120.0, keys=0x0, x=415, y=358, client=gtk2.client, wid=1 mousewheel: send 1 wheel events to the server for distance=-120, remainder=0 mousewheel: orientation=vertical distance=-360.0, units=-3, new value=-360.0, keys=0x0, x=415, y=358, client=gtk2.client, wid=1 mousewheel: send 3 wheel events to the server for distance=-360, remainder=0
Notes:
XPRA_WHEEL_DEBUG
no longer exists, just use plain -d mouse
XPRA_WHEEL=0
which can be used to disable this new code, should it cause problems
@maxmylyn: does this improve things enough? Please also check that this has not caused any regressions in #263, which shares the same event redirection code which has been modified a little. (another feature missing in GTK we had to patch in)
Will follow up in #173: we should send each individual event without aggregating them so the server-side can then decide what it wants to do with it (ie: scroll the web page pixels at a time rather than X lines at a time)
Upped client to r12285:
So that's that for this ticket, however we still see some behavior that Xpra doesn't forward properly. When the scroll button is held, releasing the pen from the tablet should not send a click event (that way you can lift the pen repeatedly without clicking anything while holding the scroll button; thus making scrolling much easier). Should we leave this ticket for scrolling and open a new one for that, or do you want to deal with it in this ticket as well?
Also, horizontal scrolling still doesn't work.
Lastly, is there a way to tweak the threshold at which it sends a scroll event? Right now it's quite large.
is there a way to tweak the threshold at which it sends a scroll event? Right now it's quite large.
r12290 does this: you can set XPRA_WHEEL_DELTA
to any positive value, the default is 120. New beta uploaded.
This will have to do for now, we can consider something more user friendly in #173.
So that's that for this ticket, however we still see some behavior that Xpra doesn't forward properly... releasing the pen from the tablet should not send a click event
Let's put this in a new ticket and link back to this one, I will need some logs for that.
Also, horizontal scrolling still doesn't work.
Odd, the code is almost identical. That's likely to be an application issue. Does horizontal scrolling work with a regular mouse (one with extra buttons)? (at least on Linux?)
Do you see the events with xev
?
One more thing: this ticket is for win32... if you want support for OSX, we'll need a new ticket with a completely different fix. (since we're using low-level API to workaround GTK)
Let's put this in a new ticket and link back to this one, I will need some logs for that
Okay, I'll file another ticket sometime today.
Does horizontal scrolling work with a regular mouse?
On my Windows machine, it's backwards...scrolling right goes left, and left goes right. On my Fedora 23 machine, it's working fine. With the Wacom tablet it doesn't scroll horizontally at all.
support for OSX
Okay we'll file another ticket for this as well.
As per the XPRA_WHEEL_DELTA
, I'll have Jake tweek it a bit and report back what value works best.
On my Windows machine, it's backwards...scrolling right goes left, and left goes right
r12291 swaps them around. (I have no way to test this, so I had to guess which values to use previously, and guessed wrong!)
..report back what value works best.
I don't think we should change the default value for XPRA_WHEEL_DELTA
: it works perfectly for regular devices, which report a distance of 120 for each event. And those devices represent 99% of the use cases.
This should be left as a workaround for those using non-standard devices like tablets.
Raising for the imminent 0.17 release.
Okay I'm stumped. The original machine we had the Wacom tablet on will no longer scroll in Xpra period. Not with the mouse, not with the tablet, nothing. -d mouse
shows that the client AND server are sending and getting proper scroll events, but nothing happens. I honestly have no clue.
So, we connected it to my laptop here and it works fine. Unfortunately, I am no longer able to scroll horizontally as of r12388(server and client). I'll attach some logs of me scrolling horizontally and vertically.
.. the client AND server are sending and getting proper scroll events, but nothing happens
Have you tried running xev to see if the events are being sent correctly to the application layer?
If so, then it must be a problem with the application you are using for testing.
There are NO horizontal scrolling events in that log file. Only a few vertical events, ie:
mousewheel: orientation=vertical distance=-41.0, units=-1, new value=-66.0, keys=0x0, x=996, y=779, client=gtk2.client, wid=27
Are you sure that things are configured properly - as they were before?
Have you tried running xev to see if the events are being sent correctly to the application layer?
If so, then it must be a problem with the application you are using for testing.
It's not the application - shifting that exact same session to another Windows machine works perfectly fine. And, adding the Wacom tablet to that other machine, I was able to get the logs.....
There are NO horizontal scrolling events in that log file
Well, I'm not sure what to tell you other than we were most definitely scrolling horizontally and vertically.
As an aside, I'm sorry I haven't been updating quick enough - I'm only working part time until the end of May (school....), and our focus is on....other things right now. (The only reason I'm even able to do anything for the Wacom tablets is because it's an important issue)
I forgot to respond to this last point:
Are you sure that things are configured properly - as they were before?
Yes, there wasn't really anything to configure. Scrolling works perfectly fine in local applications, both vertical and horizontal. Both with the mouse and with the Wacom tablet.....which makes me realize:
as per comment:17
So, we connected it to my laptop here and it works fine. Unfortunately, I am no longer able to scroll horizontally as of r12388(server and client). I'll attach some logs of me scrolling horizontally and vertically.
It occurs to me now that horizontal scrolling never worked with the Wacom tablet, only with the mouse, which works fine right now. It's only with the Wacom tablet that it doesn't work.
My bad. Sorry about that.
So, this is still an issue in the sense that it isn't fully supported yet.
That being said, we (afarr and myself) definitely won't be given time to test this, and I'm honestly not sure where our Wacom tablet is.
I'll hold on to this for the time being - but I wouldn't hold my breath on it getting tested.
Let's close this for now, re-open it if neeed and we can follow up in #173.
(ticket log sample unuglified)
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1131