Core Wayland window system code and protocol
Find a file
David Herrmann 9fe135c46f wayland-server: return new ID in wl_client_add_resource()
wl_client_add_resource() used to return no error even though the new
resource wasn't added to the client. This currently makes it very easy to
DOS weston by simply posting thousands of "create_surface" requests with
an invalid ID. Weston simply assumes the wl_client_add_resource() request
succeeds but will never destroy the surface again as the "destroy" signal
is never called (because the surface isn't linked into the wl_map).

This change makes wl_client_add_resource() return the new ID of the added
object and 0 on failure. Servers (like weston) can now correctly
immediately destroy the surface when this call fails instead of leaving
the surface around and producing memory-leaks.

Instead of returning -1 on failure and 0 on success, I made it return the
new ID as this seems more appropriate. We can directly use it when calling
it with new_id==0.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-10 21:44:47 -04:00
cursor cursor: add cursor.pcf and extraction program 2012-09-10 21:05:14 -04:00
doc Fix grammar in the rendering section. 2012-08-13 11:00:28 -04:00
m4 Clean up .gitignore files 2010-11-11 20:11:27 -05:00
protocol protocol: Fix typo. 2012-08-16 10:49:48 -04:00
spec doc: move documentation from the tex file to docbook 2012-03-28 23:04:25 -04:00
src wayland-server: return new ID in wl_client_add_resource() 2012-09-10 21:44:47 -04:00
tests tests: Quiet warning 2012-08-29 14:12:11 -04:00
.gitignore .gitignore: Add ctags and cscope files 2012-07-23 16:40:38 -04:00
autogen.sh Update autotools configuration 2010-11-06 21:04:03 -04:00
configure.ac Bump version to 0.95.0 2012-07-24 15:45:00 -04:00
COPYING Add COPYING 2012-04-25 10:12:21 -04:00
Makefile.am Introduce libwayland-cursor, a cursor helper library 2012-05-22 15:20:13 -04:00
README README: Update 2012-07-20 12:20:20 -04:00
TODO protocol: Add transform argument to wl_output.geometry event 2012-07-22 15:50:37 -04:00
wayland-scanner.m4.in Split into a core repository that only holds the core Wayland libraries 2011-02-14 22:21:13 -05:00
wayland-scanner.mk Split into a core repository that only holds the core Wayland libraries 2011-02-14 22:21:13 -05:00

What is Wayland

Wayland is a project to define a protocol for a compositor to talk to
its clients as well as a library implementation of the protocol.  The
compositor can be a standalone display server running on Linux kernel
modesetting and evdev input devices, an X applications, or a wayland
client itself.  The clients can be traditional applications, X servers
(rootless or fullscreen) or other display servers.

The wayland protocol is essentially only about input handling and
buffer management.  The compositor receives input events and forwards
them to the relevant client.  The clients creates buffers and renders
into them and notifies the compositor when it needs to redraw.  The
protocol also handles drag and drop, selections, window management and
other interactions that must go through the compositor.  However, the
protocol does not handle rendering, which is one of the features that
makes wayland so simple.  All clients are expected to handle rendering
themselves, typically through cairo or OpenGL.

The weston compositor is a reference implementation of a wayland
compositor and the weston repository also includes a few example
clients clients.

Building the wayland libraries is fairly simple, aside from libffi,
they don't have many dependencies:

    $ git clone git://anongit.freedesktop.org/wayland/wayland
    $ cd wayland
    $ ./autogen.sh --prefix=PREFIX
    $ make
    $ make install

where PREFIX is where you want to install the libraries.  See
http://wayland.freedesktop.org for more complete build instructions
for wayland, weston, xwayland and various toolkits.