The progress-bar took *all* particle elements into account when
calculating the (relative) mouse position on mouse events.
This is wrong, since only the progress bar (that is, the empty and
filled cells) should be used. Not the start/end elements.
We now also pass the mouse event through to the start/end elements.
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.
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.
In begin_expose(), we call cairo_scaled_font_text_to_glyphs()
with (x,y) = (0,0), in order to calculate the glyph extents (needed
for width calculation).
Then, in expose(), we called it again, but with correct (x,y) offsets.
Simplify this, by caching the glyphs from begin_expose(). Then, in
expose(), simply adjust the glyph offsets before calling
cairo_show_text_glyphs().
When limiting a string (due to it exceeding it's max length), make
sure not to cut it in the middle of an utf-8 multibyte, as this
results in an invalid utf-8 string.
In particular, use cairo_scaled_font_text_to_glyphs() to calculate the
extents, since the cairo_scaled_font_text_extents() will leave the
scaled font in an error state, which is impossible to recuperate from.
Because it's the right thing to do. It worked without it, since the
f00bar main binary is linked with -rdynamic (to give plugins access to
core functions).
Since this struct only contained function pointers, make all particles
export those functions directly.
The plugin manager now defines a particle interface struct, and fills
it it by dlsym:ing the functions that used to be in particle_info.