diff --git a/glfw/build.zig b/glfw/build.zig index 0adcaf75..7106711b 100644 --- a/glfw/build.zig +++ b/glfw/build.zig @@ -38,9 +38,7 @@ pub const Options = struct { x11: bool = true, /// Only respected on Linux. - // TODO(build-system): update wayland-protocol source generation in linux system SDKs so we can - // turn this on by default. - wayland: bool = false, + wayland: bool = true, /// System SDK options. system_sdk: system_sdk.Options = .{}, @@ -170,7 +168,10 @@ fn linkGLFWDependencies(b: *Builder, step: *std.build.LibExeObjStep, options: Op }, else => { // Assume Linux-like - if (options.wayland) step.linkSystemLibraryName("wayland-client"); + if (options.wayland) { + step.linkSystemLibraryName("wayland-client"); + step.defineCMacro("WL_MARSHAL_FLAG_DESTROY", null); + } if (options.x11) { step.linkSystemLibraryName("X11"); step.linkSystemLibraryName("xcb"); diff --git a/glfw/src/sources_linux_wayland.c b/glfw/src/sources_linux_wayland.c index 31efe7a3..c96d0e77 100644 --- a/glfw/src/sources_linux_wayland.c +++ b/glfw/src/sources_linux_wayland.c @@ -2,12 +2,3 @@ #include "wl_monitor.c" #include "wl_window.c" #include "wl_init.c" - -// Note: These sources are generated by wayland-scanner, and distributed in sdk-linux-* -// See e.g. https://github.com/hexops/sdk-linux-x86_64/blob/main/generate-wayland.sh -#include "wayland-viewporter-client-protocol.c" -#include "wayland-xdg-decoration-client-protocol.c" -#include "wayland-xdg-shell-client-protocol.c" -#include "wayland-idle-inhibit-unstable-v1-client-protocol.c" -#include "wayland-pointer-constraints-unstable-v1-client-protocol.c" -#include "wayland-relative-pointer-unstable-v1-client-protocol.c" \ No newline at end of file