[RFC 00/12] Convert all wl_resources to pointers and accessor

Jason Ekstrand jason at jlekstrand.net
Fri Jun 14 08:07:51 PDT 2013


This series includes 1 wayland patch and 11 weston patches that convert
every instance of wl_resource inside weston to a pointer.  This series also
converts everything to use accessor functions instead of the structures
directly.

In its current state, everything compiles and runs against a version of
libwayland that does not export the wl_resource structure.  However, it is
marked RFC because I have not (and do not have the capability) to test it
in its entirety.  Specifically, I don't use any sort of
internationalization (input methods) and I don't have my laptop set up to
build XWayland.  I would very much appreciate it if people would test these
patches against these two things and verify that nothing extra breaks.

Also, There are a few things that have yet to be resolved including a bug
found by U. Artie Eoff and his integration test suite.  The bug was caused
buy a subtle change in the way we handled resources and surfaces.
Specifically, that the resource is no longer valid when the surface is in
the process of getting destroyed.  This is the same as the "invalid
arguments for leave" issue.  Once I get a good handle on this, I will send
out a patch for that issue.

Beyond that, I have a few notes here-and-there among the patches, but most
of it is routine.

Thanks,
 --Jason Ekstrand

Jason Ekstrand (11 for weston):
  Use wl_resource_get_user_data for weston_surface resources
  shell: Convert resources to pointers
  data-device: Change resources in wl_data_offer and wl_data_source to
    pointers.
  region: Change resource to a wl_resource pointer
  callback: Change resource to a wl_resource pointer
  input_panel_surface: Change resource to a wl_resource pointer
  text-backend: Change resources to wl_resource pointers
  input: Use wl_resource_get accessor functions for resources
  output: Use wl_resource_get accessors for weston_output resources
  subsurfaces: Use wl_resource_get accessors for subsurfaces
  Add a couple casts and wl_resource_get accessors

Jason Ekstrand (1 for wayland):
  server: Add aditional wl_resource accessors

 src/bindings.c           |   2 +-
 src/clipboard.c          |   8 +-
 src/compositor.c         | 123 ++++++++++++----------------
 src/compositor.h         |   7 +-
 src/data-device.c        | 110 ++++++++++++-------------
 src/input.c              |  76 +++++++++--------
 src/screenshooter.c      |   5 +-
 src/shell.c              | 207 +++++++++++++++++++++++++----------------------
 src/tablet-shell.c       |  69 ++++++++--------
 src/text-backend.c       | 154 ++++++++++++++++++-----------------
 src/xwayland/selection.c |   3 +-
 11 files changed, 372 insertions(+), 392 deletions(-)

-- 
1.8.1.4



More information about the wayland-devel mailing list