#include <linux/input.h>
#include "wayland-client.h"
+#include "cairo-util.h"
#include "window.h"
#include <desktop-shell-client-protocol.h>
cairo_paint(cr);
if (path) {
- image = cairo_image_surface_create_from_png(path);
+ image = load_jpeg(path);
pattern = cairo_pattern_create_for_surface(image);
sx = (double) cairo_image_surface_get_width(image) / width;
sy = (double) cairo_image_surface_get_height(image) / height;
cairo_set_source(cr, pattern);
cairo_pattern_destroy (pattern);
cairo_paint(cr);
+ cairo_surface_destroy(image);
}
cairo_destroy(cr);