Clang gets annoyed when doing offsetof for wl_container_of on a
non POD structure -- but there's no virtual inheritance of anything
fancy going on so it should shut up.
In absence of subprojects meson has no reason to look for a C compiler.
But the protocol files require it to compile and thus the build would
fail with
```
meson.build:114:0: ERROR: No host machine compiler for "gamescope-xwayland-protocol.c"
```
Addres that by adding 'c' language to the project.
Otherwise we get this warning:
WARNING: Project specifies a minimum meson_version '>=0.54.0' but uses features which were added in newer versions:
* 0.55.0: {'Wrap files with patch_directory'}
This allows a Wayland client to send arbitrary UTF-8 text to the
currently focused X11 client. Useful for virtual keyboards.
We generate a keymap on-the-fly suitable for the text to type.
Allows us to use this as a Meson subproject which means that recursive cloning doesn't matter (Meson resolves it for subprojects).
Given this subproject doesn't have a meson file, doing subproject() on it would fail, so:
Make a wrap file with an overlay that declares a proper dependency.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This allows users to more easily control how dependencies are
looked up. By default, a subproject is used, but users can pass
--force_fallback_for=[] to use system deps.
Cleans up the composite shader significantly as well as it uses
arrays of descriptors/samplers now.
This all gets unrolled as the loop is spec-constant sized.
src/wlserver.cpp:28:10: fatal error: 'wlr/xwayland.h' file not found
#include <wlr/xwayland.h>
^~~~~~~~~~~~~~~~
src/drm.cpp:666:9: error: use of undeclared identifier 'wlr_buffer_lock'; did you mean 'wlr_buffer_ref'?
buf = wlr_buffer_lock( buf );
^~~~~~~~~~~~~~~
wlr_buffer_ref
/usr/include/wlr/types/wlr_buffer.h:55:20: note: 'wlr_buffer_ref' declared here
struct wlr_buffer *wlr_buffer_ref(struct wlr_buffer *buffer);
^
src/drm.cpp:691:3: error: use of undeclared identifier 'wlr_buffer_unlock'; did you mean 'wlr_buffer_unref'?
wlr_buffer_unlock( fb->buf );
^~~~~~~~~~~~~~~~~
wlr_buffer_unref
/usr/include/wlr/types/wlr_buffer.h:60:6: note: 'wlr_buffer_unref' declared here
void wlr_buffer_unref(struct wlr_buffer *buffer);
^
src/steamcompmgr.cpp:593:2: error: use of undeclared identifier 'wlr_buffer_unlock'; did you mean 'wlr_buffer_unref'?
wlr_buffer_unlock( commit.buf );
^~~~~~~~~~~~~~~~~
wlr_buffer_unref
/usr/include/wlr/types/wlr_buffer.h:60:6: note: 'wlr_buffer_unref' declared here
void wlr_buffer_unref(struct wlr_buffer *buffer);
^
src/steamcompmgr.cpp:2491:4: error: use of undeclared identifier 'wlr_buffer_unlock'; did you mean 'wlr_buffer_unref'?
wlr_buffer_unlock( buf );
^~~~~~~~~~~~~~~~~
wlr_buffer_unref
/usr/include/wlr/types/wlr_buffer.h:60:6: note: 'wlr_buffer_unref' declared here
void wlr_buffer_unref(struct wlr_buffer *buffer);
^
src/steamcompmgr.cpp:2507:46: error: member access into incomplete type 'struct wlr_client_buffer'
result = wlr_texture_to_dmabuf( client_buf->texture, &dmabuf );
^
src/steamcompmgr.cpp:2506:11: note: forward declaration of 'wlr_client_buffer'
struct wlr_client_buffer *client_buf = (struct wlr_client_buffer *) buf;
^
`git archive` and `git clone` don't include submodules by default.
Downstream with up-to-date wlroots package may want to skip
populating subprojects/wlroots.
wlroots headers can mostly be included with extern "C" blocks. Two
exceptions are the use of `static` for array args and `class` as a
struct field. These can be #define'ed to avoid C++ build errors.
This allows the whole project to be built as a single C++ codebase,
without having to maintain hybrid header files.
For now just mark one repaint per refresh interval without any particular
alignment, as that can be hard to get in nested. We'll use the display
timing extensions for that later.
We'll have it align properly in embedded mode soon.