commit d45623c2db570b7a2e0582943734d18f3d64b126
parent 009c58fc9529e284569bf58b73964cb3dc7c5baf
Author: Issam E. Maghni <issam.e.maghni@mailbox.org>
Date: Fri, 7 May 2021 16:57:51 -0400
cairo: Replace <cairo/cairo.h> by <cairo.h>
For full context, read
https://gitlab.freedesktop.org/cairo/cairo/-/issues/479
TL;DR, cairo’s pc file adds `/cairo` to CFLAGS.
So namespace cairo shouldn’t be used.
Diffstat:
14 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/client/pool-buffer.c b/client/pool-buffer.c
@@ -1,6 +1,6 @@
#define _POSIX_C_SOURCE 200809
#include <assert.h>
-#include <cairo/cairo.h>
+#include <cairo.h>
#include <fcntl.h>
#include <pango/pangocairo.h>
#include <stdio.h>
diff --git a/common/background-image.c b/common/background-image.c
@@ -1,6 +1,6 @@
#include <assert.h>
#include "background-image.h"
-#include "cairo.h"
+#include "cairo_util.h"
#include "log.h"
#if HAVE_GDK_PIXBUF
#include <gdk-pixbuf/gdk-pixbuf.h>
diff --git a/common/cairo.c b/common/cairo.c
@@ -1,6 +1,6 @@
#include <stdint.h>
-#include <cairo/cairo.h>
-#include "cairo.h"
+#include <cairo.h>
+#include "cairo_util.h"
void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
cairo_set_source_rgba(cairo,
diff --git a/common/pango.c b/common/pango.c
@@ -1,4 +1,4 @@
-#include <cairo/cairo.h>
+#include <cairo.h>
#include <pango/pangocairo.h>
#include <stdarg.h>
#include <stdbool.h>
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "cairo.h"
+#include "cairo_util.h"
#include "log.h"
#include "stringop.h"
diff --git a/include/background-image.h b/include/background-image.h
@@ -1,6 +1,6 @@
#ifndef _SWAY_BACKGROUND_IMAGE_H
#define _SWAY_BACKGROUND_IMAGE_H
-#include "cairo.h"
+#include "cairo_util.h"
enum background_mode {
BACKGROUND_MODE_STRETCH,
diff --git a/include/cairo.h b/include/cairo.h
@@ -1,14 +0,0 @@
-#ifndef _SWAY_CAIRO_H
-#define _SWAY_CAIRO_H
-#include "config.h"
-#include <stdint.h>
-#include <cairo/cairo.h>
-#include <wayland-client-protocol.h>
-
-void cairo_set_source_u32(cairo_t *cairo, uint32_t color);
-cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel);
-
-cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image,
- int width, int height);
-
-#endif
diff --git a/include/cairo_util.h b/include/cairo_util.h
@@ -0,0 +1,14 @@
+#ifndef _SWAY_CAIRO_UTIL_H
+#define _SWAY_CAIRO_UTIL_H
+#include "config.h"
+#include <stdint.h>
+#include <cairo.h>
+#include <wayland-client-protocol.h>
+
+void cairo_set_source_u32(cairo_t *cairo, uint32_t color);
+cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel);
+
+cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image,
+ int width, int height);
+
+#endif
diff --git a/include/pango.h b/include/pango.h
@@ -3,7 +3,7 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
-#include <cairo/cairo.h>
+#include <cairo.h>
#include <pango/pangocairo.h>
/**
diff --git a/include/pool-buffer.h b/include/pool-buffer.h
@@ -1,6 +1,6 @@
#ifndef _SWAY_BUFFERS_H
#define _SWAY_BUFFERS_H
-#include <cairo/cairo.h>
+#include <cairo.h>
#include <pango/pangocairo.h>
#include <stdbool.h>
#include <stdint.h>
diff --git a/sway/config.c b/sway/config.c
@@ -26,7 +26,7 @@
#include "sway/tree/arrange.h"
#include "sway/tree/root.h"
#include "sway/tree/workspace.h"
-#include "cairo.h"
+#include "cairo_util.h"
#include "pango.h"
#include "stringop.h"
#include "list.h"
diff --git a/sway/tree/container.c b/sway/tree/container.c
@@ -7,7 +7,7 @@
#include <strings.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_output_layout.h>
-#include "cairo.h"
+#include "cairo_util.h"
#include "pango.h"
#include "sway/config.h"
#include "sway/desktop.h"
diff --git a/swaybar/render.c b/swaybar/render.c
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
-#include "cairo.h"
+#include "cairo_util.h"
#include "pango.h"
#include "pool-buffer.h"
#include "swaybar/bar.h"
diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c
@@ -13,7 +13,7 @@
#include "swaybar/tray/item.h"
#include "swaybar/tray/tray.h"
#include "background-image.h"
-#include "cairo.h"
+#include "cairo_util.h"
#include "list.h"
#include "log.h"
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
diff --git a/swaynag/render.c b/swaynag/render.c
@@ -1,5 +1,5 @@
#include <stdint.h>
-#include "cairo.h"
+#include "cairo_util.h"
#include "log.h"
#include "pango.h"
#include "pool-buffer.h"