wayland: Fix include order when building with libdecor
The libdecor header internally includes wayland-client.h, which pulls in the wayland-client-protocol.h file from the system include path and overrides the local one generated from the included Wayland protocol spec files. Move the Wayland protocol header inclusion above the libdecor header inclusion to ensure that the locally generated protocol header is used instead.main
parent
4ca7b378c5
commit
d731ad769d
|
@ -119,6 +119,13 @@ void SDL_WAYLAND_UnloadSymbols(void);
|
||||||
#define wl_data_source_interface (*WAYLAND_wl_data_source_interface)
|
#define wl_data_source_interface (*WAYLAND_wl_data_source_interface)
|
||||||
#define wl_data_device_manager_interface (*WAYLAND_wl_data_device_manager_interface)
|
#define wl_data_device_manager_interface (*WAYLAND_wl_data_device_manager_interface)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These must be included before libdecor.h, otherwise the libdecor header
|
||||||
|
* pulls in the system Wayland protocol headers instead of ours.
|
||||||
|
*/
|
||||||
|
#include "wayland-client-protocol.h"
|
||||||
|
#include "wayland-egl.h"
|
||||||
|
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
/* Must be included before our defines */
|
/* Must be included before our defines */
|
||||||
#include <libdecor.h>
|
#include <libdecor.h>
|
||||||
|
@ -164,9 +171,6 @@ void SDL_WAYLAND_UnloadSymbols(void);
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
|
#endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
|
||||||
|
|
||||||
#include "wayland-client-protocol.h"
|
|
||||||
#include "wayland-egl.h"
|
|
||||||
|
|
||||||
#endif /* SDL_waylanddyn_h_ */
|
#endif /* SDL_waylanddyn_h_ */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
Loading…
Reference in New Issue