[PATCH weston 00/17] Don't allow direct use of seat->device pointers

Derek Foreman derekf at osg.samsung.com
Wed Jul 15 11:00:31 PDT 2015


"v7" of my "Don't allow direct use of seat->device pointers" stuff.

Those pointers are funny in that they only exist after a device has been
plugged in, and they don't ever go away.  We're supposed to check if
the associated _device_count > 0 before using them.  The final patch
in this series adds helper functions that do that, renames the pointers
in the seat struct and updates users accordingly.

Some of the previous series has landed and there are 4 new patches near
the end.  This is all rebased against master as of today.

For the final patch there's still an open question wrt seat_get_* in the
seat_interface: do we really have to use *_state directly here to avoid a
race condition?

Derek Foreman (17):
  text-backend: Replace focus_listener_initialized with a bool
  exposay: Test keyboard presence before using keyboard pointer
   - style change
  bindings: Stop exporting internal functions
  compositor-drm: Simplify logic in setup_output_seat_constraint
  input: Pass the appropriate pointer type to bindings instead of a seat
   - minor style change
  desktop-shell: Make surface_touch_move take a touch instead of a seat
  desktop-shell: Make surface_move take a pointer instead of a seat
  desktop-shell: Make surface_rotate take a pointer instead of a seat
  desktop-shell: Make surface_resize take a pointer instead of a seat
  desktop-shell: Use the grabbed pointer in popup_grab_button
  bindings: make install_binding_grab take a keyboard instead of a seat
  bindings: Make run binding functions take apropriate device instead of
    a seat

<new stuff>
  input: Check device counts in bind_seat()
  desktop-shell: Don't call wl_list_init() in the middle of a list
  desktop-shell: Check for device presence properly
  fullscreen-shell: Test for device presence properly
</new stuff>

  input: Don't test keyboard/pointer/touch pointers
   style and grammar changes
   *_seat_caps_changed now use the helper functions
   the "real" pointers are now named *_state instead of *_ptr
   changes in bind_seat split into a new patch

 desktop-shell/exposay.c             |  39 ++--
 desktop-shell/input-panel.c         |   7 +-
 desktop-shell/shell.c               | 366 +++++++++++++++++++++---------------
 desktop-shell/shell.h               |   2 +-
 fullscreen-shell/fullscreen-shell.c |  18 +-
 ivi-shell/hmi-controller.c          |  30 +--
 ivi-shell/input-panel-ivi.c         |   7 +-
 ivi-shell/ivi-shell.c               |   4 +-
 src/bindings.c                      |  85 +++++----
 src/compositor-drm.c                |  31 +--
 src/compositor-fbdev.c              |   3 +-
 src/compositor-rpi.c                |   3 +-
 src/compositor-wayland.c            |  14 +-
 src/compositor-x11.c                |  18 +-
 src/compositor.c                    |  29 +--
 src/compositor.h                    |  38 ++--
 src/data-device.c                   |  41 ++--
 src/gl-renderer.c                   |   8 +-
 src/input.c                         | 247 ++++++++++++++++--------
 src/libinput-seat.c                 |  15 +-
 src/main.c                          |   7 +-
 src/pixman-renderer.c               |   2 +-
 src/screenshooter.c                 |  14 +-
 src/text-backend.c                  |  25 +--
 src/zoom.c                          |   8 +-
 tests/surface-screenshot.c          |  10 +-
 tests/weston-test.c                 |   9 +-
 xwayland/dnd.c                      |   3 +-
 xwayland/window-manager.c           |  23 ++-
 29 files changed, 675 insertions(+), 431 deletions(-)

-- 
2.1.4



More information about the wayland-devel mailing list