Most of the time it does not make sense to pass a NULL object, string, or array
to a protocol request. This commit adds an explicit “allow-null” attribute
to mark the request arguments where NULL makes sense.
Passing a NULL object, string, or array to a protocol request which is not
marked as allow-null is now an error. An implementation will never receive
a NULL value for these arguments from a client.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
It was failing with missing include files.
While here, destroy the ugly "../src/..." include
paths used in the tests that was just hacking around
this problem in the Makefile:
sed -i s/..\\/src\\/// tests/*.c
Attempting to write anything longer into the embedded char
array would create a non-null-terminated string, and all
later reads would run off the end into invalid memory.
This is a hard limitation of AF_LOCAL/AF_UNIX sockets.
Attempting to write anything longer into the embedded char
array would create a non-null-terminated string, and all
later reads would run off the end into invalid memory.
This is a hard limitation of AF_LOCAL/AF_UNIX sockets.
Always unlink() the lock file before closing the file
descriptor for it. Otherwise, there is a race like this:
Process A closes fd, releasing the lock
Process B opens the same file, taking the lock
Process A unlinks the lock file
Process C opens the same file, which now no longer exists,
and takes the lock on the newly created lock file
Process B and C both 'own' the same display socket.
unlink()ing while holding the lock is effectively a better
way to release the lock atomically.
When the server send a new object ID, the client used to have to allocate
the proxy manually and without type-safety. We now allocate the proxy
in a client-side post-processing step on the incoming closure.
Change the description of pointer.set_cursor() so that a client without
pointer focus but that currently owns the pointer surface can update the
hotspot using it.
The set_transient and set_popup requests take a wl_shell_surface as
the parent surface argument. We don't need the parent surface to be
a shell surface and this restricts the types of surfaces we can use
the transient and popup surface types on.
Provide a slot for keyboard modifier state inside wl_keyboard for
implementations to update, and use this to send wl_keyboard:;modifier
events whenever the keyboard or pointer focus changes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
XFS doesn't return the file type with opendir(), and instead only
returns it when you stat() the file itself. c66f2602 introduced a check
to ensure that only files and symlinks were loaded, while not checking
for DT_UNKNOWN. Properly handle DT_UNKNOWN by just proceeding anyway.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
If the data source is destroyed, the corresponding offers may stay around for
a little longer (until the owning client destroys it). When the offer is
finally destroyed, we have to be careful to only remove the source
destroy listener if the source hasn't yet been destroyed.
Thanks to Martin Minarik for tracking down where the corruption happened.
Some distros (e.g. gentoo) install cursor themes in non-standard
directories. Add option --with-icondir to configure.sh that sets the
directory in which to look for cursors.
We have a reasonable prototype in weston now and we're going to
conclude that the persistent selection functionality is either
going to be part of the compositor (as for weston) or use a custom
protocol.
The wl_data_source object used to specify the implementation for data
offers created for it. This means you need a data offer to retrieve the
data from the source, which makes it awkward to use in-process in a
compositor. Now we instead have three virtual functions that can be
connected to a protocol object or in-process data-sources such as an
X server proxy or clipboard.
With this event, the compositor generates one canonical keymap for all
clients, and then sends an mmap()able fd over the wire, rather than all
the clients generating possibly disparate keymaps.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>