Menu

#83 Pen disables Touch fixed for AES stylus/touch

Unstable_(example)
open
nobody
None
5
2016-05-11
2016-04-22
No

On new AES stylus/touch systems with a combined touch and pen device like the Lenovo Yoga 460, firstly the touch device too sends proximity events, secondly they come from the same source (event->device->source == GDK_SOURCE_PEN is true for touch as well).

Attached patch fixes the "Pen disables Touch" feature. Otherwise it became "Touch disables Touch" on these devices.

1 Attachments

Discussion

  • Axel Kittenberger

    • &&(!ui.use_xinput && !strcmp(event->device->name, ui.device_for_touch)))
      oh i suppose it should rather be
    • &&!(ui.use_xinput && !strcmp(event->device->name, ui.device_for_touch)))
     
    • Denis Auroux

      Denis Auroux - 2016-05-11

      Thanks! A slightly similar version of this is now in the git and cvs
      repositories.

      That said, I'm under the impression that on systems with a wacom
      combined stylus/touch device you wouldn't need to use xournal's "pen
      disables touch" feature because the wacom driver does it for you and it
      would handle things much better (at a system-wide level rather than just
      in xournal's drawing area). But perhaps I'm wrong (my laptop has a wacom
      pen + non-wacom touchscreen, so the wacom driver doesn't do "pen
      disables touch" and I don't know if it works the way I imagine it does).

      Small comment: one doesn't need to test for ui.use_xinput in the two
      lines you added -- those code paths would only happen when xinput is on
      (otherwise no proximity events should come, and no input device is of
      pen type since all events come from the core pointer device). The test
      in the existing code is just there to handle an edge case in Win32 for
      certain configurations where one wants to set touch = Core and xinput
      might be temporarily unavailable due to timeouts in certain versions of
      the wacom driver; if touch = Core and xinput is disabled then we just
      don't want to know what might or might not be a touch screen.

      Anyway, thanks again.
      Denis

      --
      Denis Auroux
      UC Berkeley, Department of Mathematics
      817 Evans Hall, Berkeley CA 94720-3840, USA
      auroux@math.berkeley.edu

       
  • Axel Kittenberger

    That said, I'm under the impression that on systems with a wacom
    combined stylus/touch device you wouldn't need to use xournal's "pen
    disables touch" feature

    I tested it and you're correct at least with most recent drivers (svn/git HEAD). Had some issues with the handling with previous driver versions and thought it would help.

     

Log in to post a comment.