xrt: fix -Wmissing-field-initializers warning in comp_window_wayland.c

Newer wayland protocols have a new filed in xdg_toplevel_listener which
is not initialized:

-----------------------------------------------------------------------
[215/315] Building C object src/xrt/compositor/CMakeFiles/comp_main.dir/main/comp_window_wayland.c.o
.../src/xrt/compositor/main/comp_window_wayland.c:182:1: warning: missing field 'configure_bounds' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
-----------------------------------------------------------------------

Detect the version when this is needed and initialize the field to
silence the warning.
This commit is contained in:
Antonio Ospite 2022-03-09 13:38:51 +01:00
parent e8c9d8f575
commit beda8f35b2

View file

@ -179,6 +179,9 @@ _xdg_toplevel_close_cb(void *data, struct xdg_toplevel *toplevel)
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
_xdg_toplevel_configure_cb,
_xdg_toplevel_close_cb,
#if XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION >= 4
NULL,
#endif
};
static void