Tablet device support for weston

Submitted by Bastian Farkas on Oct. 25, 2017, 11:12 a.m.

Details

Reviewer None
Submitted Oct. 25, 2017, 11:12 a.m.
Last Updated Dec. 19, 2017, 8:37 a.m.
Revision 3

Cover Letter(s)

Revision 1
      Hi,

with Peter Hutterers permission I modified an outdated patchset from him that adds support for tablet devices to the weston compositor. Several minor changes were needed to get the patches working with a recent weston version.

I only tested my patches with a virtual tablet device (using python-evdev).

Best regards
Bastian Farkas

Advanced Driver Information Technology GmbH
Engineering System & Architecture (ADITG/ESA) 
Robert-Bosch-Str. 200
31139 Hildesheim
Germany

Tel. +49 5121 49 6942
Fax +49 5121 49 6999
bfarkas@de.adit-jv.com

ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation
Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438  
Geschäftsführung: Wilhelm Grabow, Ken Yaguchi

Bastian Farkas (3):
  tablet: Fixed compilation errors resulting from tablet patches.
  tablet: Fixing compilation issues in weston desktop-shell related to
    tablet     support patches.
  tablet: reordered changes in weston_seat struct to not break ABI    
    compatibility

Lyude Paul (13):
  tablet: Add initial tablet support to weston
  tablet: add handling of tablet focus
  tablet: add weston grab interfaces for tablet tools
  tablet: hook up libinput tablet events
  tablet: handle tablet cursors in the compositor
  clients: add support for handling tablets
  client: Add tablet cursor support into libtoytoolkit
  client: Add support for tablet cursor motion to window frames in
    libtoytoolkit
  tablet: Add support for moving windows around using the stylus
  tablet: Add tablet support to the top panel of the desktop shell
  tablet: Add binding to activate surfaces using the tablet tool
  tablet: Add demo application for tablets
  tablet: Remove tablet-specific tools on disconnect

 .gitignore                  |   1 +
 Makefile.am                 |  20 +-
 clients/desktop-shell.c     |  56 +++
 clients/tablet.c            | 254 ++++++++++++
 clients/window.c            | 686 +++++++++++++++++++++++++++++++
 clients/window.h            |  93 +++++
 configure.ac                |   2 +-
 desktop-shell/shell.c       | 289 +++++++++++++
 libweston/bindings.c        |  39 +-
 libweston/compositor.c      |   8 +
 libweston/compositor.h      | 204 ++++++++++
 libweston/input.c           | 963 ++++++++++++++++++++++++++++++++++++++++++++
 libweston/libinput-device.c | 340 ++++++++++++++++
 libweston/libinput-device.h |   4 +-
 shared/cairo-util.h         |   4 +
 shared/frame.c              |  38 ++
 16 files changed, 2994 insertions(+), 7 deletions(-)
 create mode 100644 clients/tablet.c
    
Revision 2
      Hi,

The previous posting of this series was at
https://lists.freedesktop.org/archives/wayland-devel/2017-October/035534.html

which had some issues when Jason Gerecke <killertofu@gmail.com> tried to test it.
https://lists.freedesktop.org/archives/wayland-devel/2017-November/035716.html

In this v2 series, I resolved one possible NULL pointer access issue in input.c

Best Regards,
Maniraj D.

Bastian Farkas (3):
  tablet: Fixed compilation errors resulting from tablet patches.
  tablet: Fixing compilation issues in weston desktop-shell related to
    tablet support patches.
  tablet: reordered changes in weston_seat struct to not break ABI
    compatibility

Lyude Paul (13):
  tablet: Add initial tablet support to weston
  tablet: add handling of tablet focus
  tablet: add weston grab interfaces for tablet tools
  tablet: hook up libinput tablet events
  tablet: handle tablet cursors in the compositor
  clients: add support for handling tablets
  client: Add tablet cursor support into libtoytoolkit
  client: Add support for tablet cursor motion to window frames in
    libtoytoolkit
  tablet: Add support for moving windows around using the stylus
  tablet: Add tablet support to the top panel of the desktop shell
  tablet: Add binding to activate surfaces using the tablet tool
  tablet: Add demo application for tablets
  tablet: Remove tablet-specific tools on disconnect

 .gitignore                  |   1 +
 Makefile.am                 |  20 +-
 clients/desktop-shell.c     |  56 +++
 clients/tablet.c            | 254 ++++++++++++
 clients/window.c            | 686 +++++++++++++++++++++++++++++++
 clients/window.h            |  93 +++++
 configure.ac                |   2 +-
 desktop-shell/shell.c       | 289 +++++++++++++
 libweston/bindings.c        |  39 +-
 libweston/compositor.c      |   8 +
 libweston/compositor.h      | 204 ++++++++++
 libweston/input.c           | 963 ++++++++++++++++++++++++++++++++++++++++++++
 libweston/libinput-device.c | 340 ++++++++++++++++
 libweston/libinput-device.h |   4 +-
 shared/cairo-util.h         |   4 +
 shared/frame.c              |  38 ++
 16 files changed, 2994 insertions(+), 7 deletions(-)
 create mode 100644 clients/tablet.c
    
Revision 3
      Hi Jason,

I found the root cause for the backtrace you shared
https://lists.freedesktop.org/archives/wayland-devel/2017-November/035964.html

The issue is that the tablet tool's surface and view is not
set as mapped in tablet_tool_cursor_surface_configure API,
so the same view can be added more than once to the cursor
layer list when the set_cursor is called by the client. This will
lead to corruption of cursor layer list.

The issue is resolved with this patch series,
Can you please test the same and let us know the result.

Best Regards,
Maniraj D.

Bastian Farkas (3):
  tablet: Fixed compilation errors resulting from tablet patches.
  tablet: Fixing compilation issues in weston desktop-shell related to
    tablet     support patches.
  tablet: reordered changes in weston_seat struct to not break ABI    
    compatibility

Lyude Paul (13):
  tablet: Add initial tablet support to weston
  tablet: add handling of tablet focus
  tablet: add weston grab interfaces for tablet tools
  tablet: hook up libinput tablet events
  tablet: handle tablet cursors in the compositor
  clients: add support for handling tablets
  client: Add tablet cursor support into libtoytoolkit
  client: Add support for tablet cursor motion to window frames in
    libtoytoolkit
  tablet: Add support for moving windows around using the stylus
  tablet: Add tablet support to the top panel of the desktop shell
  tablet: Add binding to activate surfaces using the tablet tool
  tablet: Add demo application for tablets
  tablet: Remove tablet-specific tools on disconnect

Maniraj Devadoss (1):
  tablet: unmap the surface only if the sprite is not NULL

 .gitignore                  |   1 +
 Makefile.am                 |  20 +-
 clients/desktop-shell.c     |  56 +++
 clients/tablet.c            | 254 ++++++++++++
 clients/window.c            | 686 +++++++++++++++++++++++++++++++
 clients/window.h            |  93 +++++
 configure.ac                |   2 +-
 desktop-shell/shell.c       | 289 +++++++++++++
 libweston/bindings.c        |  39 +-
 libweston/compositor.c      |   8 +
 libweston/compositor.h      | 204 ++++++++++
 libweston/input.c           | 965 ++++++++++++++++++++++++++++++++++++++++++++
 libweston/libinput-device.c | 340 ++++++++++++++++
 libweston/libinput-device.h |   4 +-
 shared/cairo-util.h         |   4 +
 shared/frame.c              |  38 ++
 16 files changed, 2996 insertions(+), 7 deletions(-)
 create mode 100644 clients/tablet.c
    

Revisions

SERIES REVISION IS NOT COMPLETE. We've got 0 out of 16 expected patches.

Patches download mbox

# Name Submitter State A F R T

Patches download mbox

# Name Submitter State A F R T
[weston,v2,01/16] tablet: Add initial tablet support to weston Maniraj Devadoss Superseded
[weston,v2,02/16] tablet: add handling of tablet focus Maniraj Devadoss Superseded
[weston,v2,03/16] tablet: add weston grab interfaces for tablet tools Maniraj Devadoss Superseded
[weston,v2,04/16] tablet: hook up libinput tablet events Maniraj Devadoss Superseded 1
[weston,v2,05/16] tablet: handle tablet cursors in the compositor Maniraj Devadoss Superseded
[weston,v2,06/16] clients: add support for handling tablets Maniraj Devadoss Superseded 1
[weston,v2,07/16] client: Add tablet cursor support into libtoytoolkit Maniraj Devadoss Superseded 1
[weston,v2,08/16] client: Add support for tablet cursor motion to window frames in libtoytoolkit Maniraj Devadoss Superseded 1
[weston,v2,09/16] tablet: Add support for moving windows around using the stylus Maniraj Devadoss Superseded
[weston,v2,10/16] tablet: Add tablet support to the top panel of the desktop shell Maniraj Devadoss Superseded
[weston,v2,11/16] tablet: Add binding to activate surfaces using the tablet tool Maniraj Devadoss Superseded
[weston,v2,12/16] tablet: Add demo application for tablets Maniraj Devadoss Superseded
[weston,v2,13/16] tablet: Remove tablet-specific tools on disconnect Maniraj Devadoss Superseded
[weston,v2,14/16] tablet: Fixed compilation errors resulting from tablet patches. Maniraj Devadoss Superseded
[weston,v2,15/16] tablet: Fixing compilation issues in weston desktop-shell related to tablet sup... Maniraj Devadoss Superseded
[weston,v2,16/16] tablet: reordered changes in weston_seat struct to not break ABI compatibility Maniraj Devadoss Superseded

Patches download mbox

# Name Submitter State A F R T
[weston,v3,01/17] tablet: Add initial tablet support to weston Maniraj Devadoss New
[weston,v3,02/17] tablet: add handling of tablet focus Maniraj Devadoss New
[weston,v3,03/17] tablet: add weston grab interfaces for tablet tools Maniraj Devadoss New
[weston,v3,04/17] tablet: hook up libinput tablet events Maniraj Devadoss New 1
[weston,v3,05/17] tablet: handle tablet cursors in the compositor Maniraj Devadoss New
[weston,v3,06/17] clients: add support for handling tablets Maniraj Devadoss New 1
[weston,v3,07/17] client: Add tablet cursor support into libtoytoolkit Maniraj Devadoss New 1
[weston,v3,08/17] client: Add support for tablet cursor motion to window frames in libtoytoolkit Maniraj Devadoss New 1
[weston,v3,09/17] tablet: Add support for moving windows around using the stylus Maniraj Devadoss New
[weston,v3,10/17] tablet: Add tablet support to the top panel of the desktop shell Maniraj Devadoss New
[weston,v3,11/17] tablet: Add binding to activate surfaces using the tablet tool Maniraj Devadoss New
[weston,v3,12/17] tablet: Add demo application for tablets Maniraj Devadoss New
[weston,v3,13/17] tablet: Remove tablet-specific tools on disconnect Maniraj Devadoss New
[weston,v3,14/17] tablet: Fixed compilation errors resulting from tablet patches. Maniraj Devadoss New
[weston,v3,15/17] tablet: Fixing compilation issues in weston desktop-shell related to tablet sup... Maniraj Devadoss New
[weston,v3,16/17] tablet: reordered changes in weston_seat struct to not break ABI compatibility Maniraj Devadoss New
[weston,v3,17/17] tablet: set the tablet tool surface and view as mapped Maniraj Devadoss New