diff --git a/wmmenu/Makefile b/wmmenu/Makefile index de9cde7..730ad10 100644 --- a/wmmenu/Makefile +++ b/wmmenu/Makefile @@ -11,7 +11,7 @@ ifdef GDKPIXBUF2 PIXBUF_CFG = pkg-config gdk-pixbuf-xlib-2.0 PIXBUF_DEF = -DWITH_GDKPIXBUF PIXBUF_INC := $(shell $(PIXBUF_CFG) --cflags) -PIXBUF_LIB := -rdynamic -L$(shell $(PIXBUF_CFG) --variable=prefix)/lib -lgdk_pixbuf_xlib-2.0 +PIXBUF_LIB := -rdynamic -L$(shell $(PIXBUF_CFG) --variable=prefix)/lib -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 endif CC = gcc #-g diff --git a/wmmenu/pixmaps.c b/wmmenu/pixmaps.c index 8799dbb..92b7d4e 100644 --- a/wmmenu/pixmaps.c +++ b/wmmenu/pixmaps.c @@ -2,7 +2,7 @@ #include #ifdef WITH_GDKPIXBUF -#include +#include #endif #include @@ -28,6 +28,7 @@ extern void Pixmaps_FindLoad (const char * name, GdkPixbuf * pix ; int width, height ; void (* problem) (const char *, ...) ; + GError *gerror = NULL; if (mustInitGdkPixbuf) { @@ -59,7 +60,7 @@ extern void Pixmaps_FindLoad (const char * name, UseDefault () ; } else - if ((pix = gdk_pixbuf_new_from_file (path)) == NULL) + if ((pix = gdk_pixbuf_new_from_file (path, &gerror)) == NULL) { problem ("can't load image \"%s\"", path) ; UseDefault () ; @@ -112,6 +113,13 @@ We have to reimplement a few trivial gdk functions here to avoid linking with it ! */ +typedef struct { + guint32 pixel; + guint16 red; + guint16 green; + guint16 blue; +} GdkColor; + extern gint gdk_screen_width (void) { return DisplayWidth (DADisplay, DefaultScreen (DADisplay)) ;