All decoration, particle and module interfaces now takes a
pixman_image_t parameter, and all drawing is done using pixman APIs.
The wayland/xcb backends implement a new interface functions,
get_pixman_image(), that should return a pixman image instance that is
suitable for rendering.
In the wayland backend, the image uses the same backing data as the
cairo surface.
In the XCB backend, we create a new image each time, and then blit it
to the cairo surface at commit time.
We're in a subprocess about to exit anyway, with stdout/stderr
typically closed. We can't do anything but ignore write() failures.
Fixes building with -D_FORTIFY_SOURCE=2
* Make sure to _exit() in all forked code paths that doesn't end in a
successful exec()
* Report errno to parent process on failure so that we can log it
The second point is implemented by a) manually double forking instead
of calling daemon(), and b) using a pipe in the inner fork to be able
to wait for the child process to either succeed in its exec() call, or
write errno to the pipe on failure.
This fixes hangs and crashes when e.g. the binary we're trying to
execute doesn't exist.
In cases where it makes sense, use calloc() instead of malloc():
* When allocating large objects with many members, many for which
NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
If a particle has an on-click handler, execute it when we receive an
ON_MOUSE_CLICK event.
This is done by first tokenizing the command string. We currently
handle one level of quotes, but no escape characters.
Then, fork(). Main process waits for child to finish. Child daemonizes
and then execvp() the tokenized argument vector.
This is intended to be a format-like string, with the possibility to
use tag formatters.
The expanded string will later be passed to the system() call.