mirror of
https://github.com/swaywm/sway.git
synced 2026-04-17 06:46:32 -04:00
Finds paths to icon files using libsfdo. Libsfdo is currently an
optional compile time dependency. This means the former code paths are all retained and new ones are wrapped in #if HAVE_LIBSFDO. Behavior should be identical now between the two code paths. Later commits will add the handling of icons specified as absolute paths which both former swaybar code and libsfdo have thus far avoided.
This commit is contained in:
parent
34d2020042
commit
478c77a69b
14 changed files with 220 additions and 23 deletions
|
|
@ -7,6 +7,10 @@
|
|||
#include "list.h"
|
||||
#include "log.h"
|
||||
|
||||
#if HAVE_LIBSFDO
|
||||
#include "sfdo.h"
|
||||
#endif
|
||||
|
||||
uint32_t parse_position(const char *position) {
|
||||
uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
|
||||
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
|
||||
|
|
@ -131,5 +135,15 @@ void free_config(struct swaybar_config *config) {
|
|||
|
||||
free(config->icon_theme);
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBSFDO && !HAVE_TRAY
|
||||
free(config->icon_theme);
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBSFDO
|
||||
sfdo_destroy(config->sfdo);
|
||||
sway_log(SWAY_DEBUG, "Destroyed swaybar sfdo");
|
||||
#endif
|
||||
|
||||
free(config);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue