ecore-wayland: test for subsurface protocol in wayland core
The subsurface protocol was moved into Wayland Core
around v1.3.90 (i.e. v1.4.0).
Test if subsurface protocol is part of wayland-client.h.
If not, we include our own copy of the protocol header.
Also, some whitespace cleanup in ecore_wl.c.
Tested with Wayland 1.3.0 and 1.3.90 (master:360dca5).
Change-Id: I42282cffcc0ecd119f5e38f27fe934494ed59864
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
#include <fcntl.h>
#include "ecore_wl_private.h"
-#include <subsurface-client-protocol.h>
+
+/*
+ * The subsurface protocol was moved into Wayland Core
+ * around v1.3.90 (i.e. v1.4.0).
+ * Test if subsurface protocol is part of wayland-client.h.
+ * If not, we include our own copy of the protocol header.
+ */
+#include <wayland-client.h>
+#ifndef WL_SUBSURFACE_ERROR_ENUM
+# include <subsurface-client-protocol.h>
+#endif
/* local function prototypes */
static Eina_Bool _ecore_wl_shutdown(Eina_Bool close);
#endif
#include "ecore_wl_private.h"
-#include <subsurface-client-protocol.h>
+
+/*
+ * The subsurface protocol was moved into Wayland Core
+ * around v1.3.90 (i.e. v1.4.0).
+ * Test if subsurface protocol is part of wayland-client.h.
+ * If not, we include our own copy of the protocol header.
+ */
+#include <wayland-client.h>
+#ifndef WL_SUBSURFACE_ERROR_ENUM
+# include <subsurface-client-protocol.h>
+#endif
struct _Ecore_Wl_Subsurf
{