protocol: Copy missing pixel formats from wl_drm to wl_shm
client: Simply wl_display_dispatch_queue_pending() and fix return value

We're supposed to return number of events dispatched on success, not 0.
Refactor to avoid goto and just return ret.
server: Handle OOM properly when we fail to allocate a send closure

If we can't allocate a closure, don't just silently continue.  Set
client->error so we shut down the client when we're done processing events.
server: Set client->error when we fail to send a closure

We we're using wl_event_loop_add_idle() here, but if we're failing
because of OOM, that will typically also fail.  Instead, use the
existing client->error flag, which will break out of the event
handling loop and shut down the client.
shm: Add API for renderers to register additional pixel formats
Don't include wayland-server.h in wayland-private.h

We just declare struct wl_display manually instead.
scanner: support help and --help

wayland-scanner without arguments prints out usage. With help or --help it
waits for stdin to supply something which isn't quite as informative as
printing out the help.

This patch also moves the strcmp for args up to have all of them in one
location.
scanner: expand help string

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
scanner: check for wayland-scanner.pc before using variables

If wayland-scanner.pc can't be found the variables end up being set
irrespectively, leaving the user with odd compiler errors about missing
headers, etc.
server: Release additional_shm_formats array at display destruction
publican: Cleanup Preface's grammar.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
publican: Drop unneeded 'of'

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
publican: Fix grammar several places in Protocol docs

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
client: Improve spelling and grammar in comments

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
protocol: Fix typo by removing a redundant 'a'

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
protocol: Add missing d to 'x an y'

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
protocol: Improve grammar for set class description

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
protocol: Fix pluralization of user in popup_done description

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
wayland-server: Add a wl_resource_for_each macro

This macro allows you to correctly iterate through a list of resources
handling the opaque nature of this type.
wayland-client: Add wl_proxy_get_listener

This is the mirror function to wl_proxy_add_listener and is useful
inside client libraries to differentiate events on listeners for which
multiple proxies have been created.