This is done by implementing a generic verify_dict() function, that
takes an array of attribute metadata.
The attribute metadata consists of the attribute name, whether it's
required or optional, and a verify callback function.
This fixes lots of memory leaks detected by valgrind.
Unsure if this is how you're supposed to shutdown cairo. You'd
think (from the documentation) that destroying the surface would (when
the refcount reaches 0) destroy the device too...
Before shutting down and destroying cairo and XCB, make sure the
modules, particles and fonts have been destroyed.
I.e. move module destruction from bar's destroy() to the end of bar's
run()
If the user hasn't specified a specific template for a workspace, try
to lookup a default one (the empty string).
This allows the user to configure a "fallback" template to be used for
"extra", or not-often-used workspaces.
Warn if volume and/or muted state is inconsistent (as we only expose a
single volume/muted state).
Also, don't query for current volume if max == 0 (i.e. typically a
digital output).
Finally, make absolutely sure that volume min is really less (or
equal) to volume max, and that the current volume level is between min
and max.
This allows us to a) move away from cairo's "toy" API, and b) let the
user specify font options in a single font "name" string:
Serif:size=10:weight=bold:slant=italic
This also allows us to simplify the font code significantly (except
for the fontconfig parts...); the font no longer sets itself in a
cairo surface - font users do that; the font simply returns a
cairo_scaled_font_t.
Furthermore, font_clone() has now been simplified to basically just
refcount the scaled font. I.e. there's no need to run the full
constructor and lookup and instantiate the cairo scaled font again.
Gcc (correctly) figured out that we may end up truncating the socket
path. In practice, it's something that should never happen.
Never the less, silence the warning by writing the socket path
directly into the sockaddr_un object.
When snd_mixer_selem_get_*() fails, the values were left
uninitialized, trigger a valgrind warning.
In addition to fixing this, the error(s) are now logged (but only as
warnings, as they are not fatal).
This is done by creating an XCB connection, whose only purpose is to
detect a POLLHUP (xcb disconncet).
Furthermore, make sure SIGINT is blocked in all threads except the
main thread.
That is, instead of writing:
content:
list:
items:
- string: ..
- string: ..
It is now possible to write:
content:
- string: ...
- string: ...
Obviously, this means it's not possible to assign spacing, margin or
on-click handlers to such a list.