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).

Fixes T529

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This commit is contained in:
U. Artie Eoff 2013-11-22 04:39:03 -08:00
parent 58368ea636
commit cfb121c8f8
2 changed files with 39 additions and 19 deletions

View File

@ -4,7 +4,17 @@
#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);

View File

@ -3,7 +3,17 @@
#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
{