aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-02-10 12:13:09 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-02-10 12:20:44 +0100
commit8d56fae41b6b5d683603da3320bed7a62483eaa9 (patch)
treeeefd44d0ffb7dd718ebee1c28b9ae368ea2ead3d
parent0239a4242ad7b0c44f8525b96e9d14a35474a0e0 (diff)
downloadliberty-8d56fae41b6b5d683603da3320bed7a62483eaa9.tar.gz
liberty-8d56fae41b6b5d683603da3320bed7a62483eaa9.tar.xz
liberty-8d56fae41b6b5d683603da3320bed7a62483eaa9.zip
liberty-xdg: actually make libpng optional
-rw-r--r--liberty-xdg.c9
-rw-r--r--liberty-xui.c1
2 files changed, 8 insertions, 2 deletions
diff --git a/liberty-xdg.c b/liberty-xdg.c
index 9f0b9f8..3c20df4 100644
--- a/liberty-xdg.c
+++ b/liberty-xdg.c
@@ -21,9 +21,11 @@
#ifdef LIBERTY_XDG_WANT_X11
#include <X11/Xatom.h>
#include <X11/Xlib.h>
+#endif
+#ifdef LIBERTY_XDG_WANT_ICONS
#include <png.h>
-#endif // LIBERTY_XDG_WANT_X11
+#endif
// --- XSettings ---------------------------------------------------------------
@@ -200,7 +202,7 @@ fail:
// --- Desktop file parser -----------------------------------------------------
-// Useful for parsing desktop-file-spec, icon-theme-spec, trash-spec,
+// Useful for parsing desktop-entry-spec, icon-theme-spec, trash-spec,
// mime-apps-spec. This code is not designed for making changes to the files.
struct desktop_file
@@ -434,6 +436,8 @@ desktop_file_get_integer (struct desktop_file *self,
// This implements part of the Icon Theme Specification.
+#ifdef LIBERTY_XDG_WANT_ICONS
+
struct icon_theme_icon
{
uint32_t width; ///< Width of argb in pixels
@@ -764,3 +768,4 @@ icon_theme_set_window_icon (Display *dpy,
}
#endif // LIBERTY_XDG_WANT_X11
+#endif // LIBERTY_XDG_WANT_ICONS
diff --git a/liberty-xui.c b/liberty-xui.c
index a538da7..2096a61 100644
--- a/liberty-xui.c
+++ b/liberty-xui.c
@@ -69,6 +69,7 @@ enum { XUI_KEYMOD_DOUBLE_CLICK = 1 << 15 };
#include <X11/Xft/Xft.h>
#define LIBERTY_XDG_WANT_X11
+#define LIBERTY_XDG_WANT_ICONS
#include "liberty-xdg.c"
#endif // LIBERTY_XUI_WANT_X11