RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process
Start replacing zig-wlroots with an in-tree @cImport facade
Claudef02b143e559e
diff --git a/AGENTS.md b/AGENTS.mdindex 0febcf7..d7705ec 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -5,7 +5,7 @@ Tests: `TESTING.md`. Where code lives: [source map](docs/agent-notes/map.md).Area notes are in an `AGENTS.md` beside the code; readthe one for the directory you work in: `src/files`, `src/editor`,`src/desktop`, `src/input`, `src/control_center`, `src/ui`, `src/session`,-`src/dm`, `src/accounts_helper`, `src/printing`, `scripts`.+`src/dm`, `src/accounts_helper`, `src/printing`, `scripts`, `src/wlr`.## Working rules@@ -261,6 +261,10 @@ panel painting. The key rules:`ScreencopyFrameV1.buffer` can be NULL: read through `*const ?*T`.`wlr.Pointer` is 8 bytes short: embed it in an extern wrapper(`input/virtual.zig`) or `wlr_pointer_init` overwrites the next field.+ `src/wlr/` is migrating `wlr.*` off this hand-mirrored dependency onto an+ in-tree `@cImport` facade, one subsystem at a time, to stop depending on+ zig-wlroots's own release cadence; read `src/wlr/AGENTS.md` before adding+ a new wlr type or forwarding one off `old`.* Debug `main.gpa` is `DebugAllocator`: freed memory reads `0xaa…` (glibc`MALLOC_PERTURB_`: `0xa5…`), leaks print at exit in the compositor log. Freeprocess-lifetime caches in `main.start`'s defers; state workers read duringdiff --git a/build.zig b/build.zigindex 57494fd..c2dcdf2 100644--- a/build.zig+++ b/build.zig@@ -35,15 +35,39 @@ pub fn build(b: *std.Build) void {const wayland = protocols.module(b);const xkbcommon = b.dependency("xkbcommon", .{}).module("xkbcommon");const pixman = b.dependency("pixman", .{}).module("pixman");- const wlroots = b.dependency("wlroots", .{}).module("wlroots");+ const wlroots_dep = b.dependency("wlroots", .{}).module("wlroots");- wlroots.addImport("wayland", wayland);- wlroots.addImport("xkbcommon", xkbcommon);- wlroots.addImport("pixman", pixman);+ wlroots_dep.addImport("wayland", wayland);+ wlroots_dep.addImport("xkbcommon", xkbcommon);+ wlroots_dep.addImport("pixman", pixman);// Expose the wlroots include path from pkg-config to its @cImport calls.- wlroots.resolved_target = target;- wlroots.linkSystemLibrary("wlroots-0.20", .{});+ wlroots_dep.resolved_target = target;+ wlroots_dep.linkSystemLibrary("wlroots-0.20", .{});++ // In-tree facade over wlroots (src/wlr/AGENTS.md / top-level AGENTS.md's+ // "zig-wlroots" note): migrates off zig-wlroots onto @cImport one+ // subsystem at a time. Everything not yet migrated forwards to the real+ // zig-wlroots module above, imported here as "old". Every existing user+ // of the module named `wlroots` below gets the facade transparently.+ const wlr_facade = b.createModule(.{ .root_source_file = b.path("src/wlr/wlr.zig") });+ wlr_facade.addImport("old", wlroots_dep);+ wlr_facade.addImport("wayland", wayland);+ wlr_facade.resolved_target = target;+ wlr_facade.linkSystemLibrary("wlroots-0.20", .{});++ // wlr/types/wlr_output_power_management_v1.h #includes its protocol's+ // generated server header; wlroots doesn't install that header for+ // consumers, so generate it the same way build/protocols.zig's scanner+ // does internally, just emitting a C header instead of Zig bindings.+ const output_power_protocol_header = blk: {+ const run = b.addSystemCommand(&.{ "wayland-scanner", "server-header" });+ run.addFileArg(b.path("protocol/wlr-output-power-management-unstable-v1.xml"));+ break :blk run.addOutputFileArg("wlr-output-power-management-unstable-v1-protocol.h");+ };+ wlr_facade.addIncludePath(output_power_protocol_header.dirname());++ const wlroots = wlr_facade;// Module roots enforce one-way dependencies: shared code cannot import Server.const memory_mod = b.createModule(.{ .root_source_file = b.path("src/memory/allocator.zig"), .target = target, .optimize = optimize });diff --git a/src/wlr/AGENTS.md b/src/wlr/AGENTS.mdnew file mode 100644index 0000000..2f3bbb8--- /dev/null+++ b/src/wlr/AGENTS.md@@ -0,0 +1,61 @@+# src/wlr: the in-tree wlroots facade++Replaces `zig-wlroots` one subsystem at a time with a module backed+directly by `@cImport` against the real wlroots headers, because+hand-mirroring wlroots' C ABI by hand (what zig-wlroots does) both lags+new Zig releases and risks silent layout bugs (`wlr.Pointer` was 8 bytes+short at one point, see the top-level AGENTS.md). `@cImport` ships inside+the compiler, so it tracks whatever Zig version is building the project+automatically, and the compiler reads the real struct layout instead of a+hand-typed copy of it.++## How it's wired++`wlr.zig` is what `@import("wlroots")` resolves to (set in `build.zig`).+It re-exports every `wlr.*` name the rest of the compositor uses. A+migrated type comes from this directory; everything else forwards+straight to the real zig-wlroots dependency, imported here as `old`+(`build.zig`'s `wlroots_dep`, still fetched via `build.zig.zon`). Callers+never see which side a type comes from.++`c.zig` holds the single `@cImport` block every migrated file imports+from. Keep it one block: translate-c assigns each header its own type+identities per `@cImport` call, so two separate `@cImport`s of the same+header produce two incompatible Zig types.++## Adding a migrated type++1. Add its header to `c.zig`'s `@cImport`.+2. If the type is a plain value with no pointers (`Box`, `Edges`-shaped+ things): redeclare its fields so Zig's method-call sugar works+ (`c.wlr_foo` is a foreign type you can't attach `pub fn`s to from this+ file), call the real `wlr_foo_*` functions from the methods, and add+ `assertFieldOffset`/`assertSameLayout` (`signal.zig`) for every field —+ see `box.zig`.+3. If it has a `wl_signal`/`wl_resource`/`wl_list` field: same+ redeclare-and-assert approach, but retype those fields as+ zig-wayland's `wl.Signal(T)` / `wl.Resource` / `wl.list.Head(T, field)`+ instead of the raw `@cImport` type, so `.add()`/`.get()`/`.emit()` work+ on the result. This is safe only because `struct wl_signal` is one+ `wl_list` and `struct wl_listener` is a `wl_list` plus a function+ pointer, and always will be — that's what `assertSameLayout` is+ checking, not a formality. Omit trailing private/`WLR_PRIVATE` fields+ entirely rather than guessing their shape: you only ever handle this+ type through a pointer wlroots itself allocated, so Zig never needs to+ know its true size. See `output_power.zig`.+4. **Check who else takes or returns this type before wiring it into+ `wlr.zig`.** Zig's `extern struct`s are nominally typed: a function+ still on `old` that takes `*old.Box` will not accept a `*wlr.Box` built+ from `c.zig`, even though the two are byte-for-byte identical. `Box`,+ `FBox`, and `Edges` hit this — they're drafted in `box.zig`/`edges.zig`+ and verified against the real headers, but `wlr.zig` still forwards+ them to `old` because `OutputLayout.getBox`, `XdgToplevel.setTiled`,+ and others haven't migrated yet. A type like that moves together with+ (or after) every not-yet-migrated signature that references it, not+ on its own. A protocol-generated header wlroots itself doesn't install+ (anything under `wlr_types_*_v1.h` that `#include`s its own+ `*-protocol.h`) needs that header generated at build time — see+ `output_power_protocol_header` in `build.zig` for the+ `wayland-scanner`-based pattern.+5. Build Debug and `-Doptimize=ReleaseSafe`, run `zig build test`, per the+ top-level AGENTS.md.diff --git a/src/wlr/box.zig b/src/wlr/box.zignew file mode 100644index 0000000..086eeb6--- /dev/null+++ b/src/wlr/box.zig@@ -0,0 +1,78 @@+//! wlr.Box / wlr.FBox, backed by @cImport against wlr/util/box.h instead+//! of a hand-mirrored extern struct. The four fields are redeclared here+//! only so Zig's method-call sugar works on them (an alias to the+//! @cImport type directly can't carry extra pub fns); the comptime+//! asserts below keep that redeclaration honest against the real header.+const c = @import("c.zig").c;+const assertFieldOffset = @import("signal.zig").assertFieldOffset;+const assertSameLayout = @import("signal.zig").assertSameLayout;++pub const Box = extern struct {+ x: c_int,+ y: c_int,+ width: c_int,+ height: c_int,++ pub fn closestPoint(box: *const Box, x: f64, y: f64, dest_x: *f64, dest_y: *f64) void {+ c.wlr_box_closest_point(@ptrCast(box), x, y, dest_x, dest_y);+ }++ pub fn intersection(dest: *Box, box_a: ?*const Box, box_b: ?*const Box) bool {+ return c.wlr_box_intersection(@ptrCast(dest), @ptrCast(box_a), @ptrCast(box_b));+ }++ pub fn containsPoint(box: ?*const Box, x: f64, y: f64) bool {+ return c.wlr_box_contains_point(@ptrCast(box), x, y);+ }++ pub fn containsBox(bigger: *const Box, smaller: *const Box) bool {+ return c.wlr_box_contains_box(@ptrCast(bigger), @ptrCast(smaller));+ }++ pub fn empty(box: ?*const Box) bool {+ return c.wlr_box_empty(@ptrCast(box));+ }++ pub fn transform(dest: *Box, box: ?*const Box, transform_: c.wl_output_transform, width: c_int, height: c_int) void {+ c.wlr_box_transform(@ptrCast(dest), @ptrCast(box), transform_, width, height);+ }++ pub fn equal(a: ?*const Box, b: ?*const Box) bool {+ return c.wlr_box_equal(@ptrCast(a), @ptrCast(b));+ }++ comptime {+ assertSameLayout(Box, c.wlr_box);+ assertFieldOffset(Box, c.wlr_box, "x");+ assertFieldOffset(Box, c.wlr_box, "y");+ assertFieldOffset(Box, c.wlr_box, "width");+ assertFieldOffset(Box, c.wlr_box, "height");+ }+};++pub const FBox = extern struct {+ x: f64,+ y: f64,+ width: f64,+ height: f64,++ pub fn empty(box: ?*const FBox) bool {+ return c.wlr_fbox_empty(@ptrCast(box));+ }++ pub fn transform(dest: *FBox, box: ?*const FBox, transform_: c.wl_output_transform, width: f64, height: f64) void {+ c.wlr_fbox_transform(@ptrCast(dest), @ptrCast(box), transform_, width, height);+ }++ pub fn equal(a: ?*const FBox, b: ?*const FBox) bool {+ return c.wlr_fbox_equal(@ptrCast(a), @ptrCast(b));+ }++ comptime {+ assertSameLayout(FBox, c.wlr_fbox);+ assertFieldOffset(FBox, c.wlr_fbox, "x");+ assertFieldOffset(FBox, c.wlr_fbox, "y");+ assertFieldOffset(FBox, c.wlr_fbox, "width");+ assertFieldOffset(FBox, c.wlr_fbox, "height");+ }+};diff --git a/src/wlr/c.zig b/src/wlr/c.zignew file mode 100644index 0000000..e4ccd3f--- /dev/null+++ b/src/wlr/c.zig@@ -0,0 +1,11 @@+//! The single @cImport boundary for every wlroots C header the facade in+//! this directory needs. One pass keeps translate-c's generated type+//! identities consistent across files, mirroring zig-wlroots's own+//! single-root `wlroots.zig` import. Add one @cInclude per header as a+//! subsystem migrates; never @cImport a header a second time elsewhere.+pub const c = @cImport({+ @cDefine("WLR_USE_UNSTABLE", {});+ @cInclude("wlr/util/box.h");+ @cInclude("wlr/util/edges.h");+ @cInclude("wlr/types/wlr_output_power_management_v1.h");+});diff --git a/src/wlr/edges.zig b/src/wlr/edges.zignew file mode 100644index 0000000..ce546a9--- /dev/null+++ b/src/wlr/edges.zig@@ -0,0 +1,11 @@+//! wlr.Edges: `enum wlr_edges` (wlr/util/edges.h) is a plain bitmask+//! (WLR_EDGE_TOP = 1<<0, ...), not a C bitfield, so this is pure+//! ergonomic sugar over a u32 -- no @cImport struct to stay in sync with,+//! just the four bit positions the header defines.+pub const Edges = packed struct(u32) {+ top: bool = false,+ bottom: bool = false,+ left: bool = false,+ right: bool = false,+ _: u28 = 0,+};diff --git a/src/wlr/output_power.zig b/src/wlr/output_power.zignew file mode 100644index 0000000..8323937--- /dev/null+++ b/src/wlr/output_power.zig@@ -0,0 +1,84 @@+//! wlr.OutputPowerManagerV1 / wlr.OutputPowerV1, backed by @cImport+//! against wlr/types/wlr_output_power_management_v1.h.+//!+//! The struct bodies are hand-redeclared (unlike most future subsystems,+//! which can usually alias the @cImport type directly) only because+//! `events.*` needs to be retyped from the real `wl_signal` to+//! zig-wayland's `wl.Signal(T)` to get `.add()`/`.get()`/`.emit()` for+//! consumers -- the same reason zig-wlroots hand-declared this struct.+//! The comptime block below is the difference: it checks every+//! redeclared field's offset against the real @cImport'd struct, so a+//! future wlroots release that reorders or inserts a field fails the+//! build instead of silently corrupting memory.+//!+//! `Output` still comes from the old zig-wlroots dependency: it hasn't+//! migrated yet, so this file takes it as a parameter from wlr.zig+//! rather than hardcoding which `Output` type is current.+const wl = @import("wayland").server.wl;+const zwlr = @import("wayland").server.zwlr;+const c = @import("c.zig").c;+const assertSameLayout = @import("signal.zig").assertSameLayout;+const assertFieldOffset = @import("signal.zig").assertFieldOffset;++pub fn Types(comptime Output: type) type {+ return struct {+ pub const OutputPowerV1 = extern struct {+ resource: *wl.Resource,+ output: *Output,+ manager: *OutputPowerManagerV1,+ /// OutputPowerManagerV1.output_powers+ link: wl.list.Link,+ data: ?*anyopaque,++ comptime {+ const Real = c.wlr_output_power_v1;+ assertFieldOffset(OutputPowerV1, Real, "resource");+ assertFieldOffset(OutputPowerV1, Real, "output");+ assertFieldOffset(OutputPowerV1, Real, "manager");+ assertFieldOffset(OutputPowerV1, Real, "link");+ assertFieldOffset(OutputPowerV1, Real, "data");+ }+ };++ pub const OutputPowerManagerV1 = extern struct {+ pub const event = struct {+ pub const SetMode = extern struct {+ output: *Output,+ mode: zwlr.OutputPowerV1.Mode,+ };+ };++ global: *wl.Global,+ output_powers: wl.list.Head(OutputPowerV1, .link),++ events: extern struct {+ set_mode: wl.Signal(*event.SetMode),+ destroy: wl.Signal(*OutputPowerManagerV1),+ },++ data: ?*anyopaque,++ pub fn create(server: *wl.Server) !*OutputPowerManagerV1 {+ const raw = c.wlr_output_power_manager_v1_create(@ptrCast(server));+ return @as(?*OutputPowerManagerV1, @ptrCast(raw)) orelse error.OutOfMemory;+ }++ comptime {+ const Real = c.wlr_output_power_manager_v1;+ assertFieldOffset(OutputPowerManagerV1, Real, "global");+ assertFieldOffset(OutputPowerManagerV1, Real, "output_powers");+ assertFieldOffset(OutputPowerManagerV1, Real, "events");+ assertFieldOffset(OutputPowerManagerV1, Real, "data");++ const Events = @FieldType(OutputPowerManagerV1, "events");+ const RealEvents = @FieldType(Real, "events");+ assertSameLayout(@FieldType(Events, "set_mode"), c.wl_signal);+ assertSameLayout(@FieldType(Events, "destroy"), c.wl_signal);+ assertFieldOffset(Events, RealEvents, "set_mode");+ assertFieldOffset(Events, RealEvents, "destroy");++ assertSameLayout(wl.list.Head(OutputPowerV1, .link), c.wl_list);+ }+ };+ };+}diff --git a/src/wlr/signal.zig b/src/wlr/signal.zignew file mode 100644index 0000000..26ccb0f--- /dev/null+++ b/src/wlr/signal.zig@@ -0,0 +1,21 @@+//! Safety net for the facade's one necessary hand-declared shape: the+//! `events` block of a wlr struct, where a field has to be retyped from+//! @cImport's raw `wl_signal` to zig-wayland's `wl.Signal(T)` to get+//! `.add()`/`.get()`/`.emit()` for free. That retyping is safe only+//! because `struct wl_signal` is just one `wl_list` (two pointers) and+//! always will be -- these asserts turn any future drift (a struct+//! reordered, a field inserted ahead of where we stopped mirroring it)+//! into a compile error instead of silent memory corruption.+const std = @import("std");++pub fn assertSameLayout(comptime A: type, comptime B: type) void {+ if (@sizeOf(A) != @sizeOf(B) or @alignOf(A) != @alignOf(B)) {+ @compileError(@typeName(A) ++ " and " ++ @typeName(B) ++ " no longer have matching size/align");+ }+}++pub fn assertFieldOffset(comptime Ours: type, comptime Real: type, comptime field: []const u8) void {+ if (@offsetOf(Ours, field) != @offsetOf(Real, field)) {+ @compileError(@typeName(Ours) ++ "." ++ field ++ " offset drifted from " ++ @typeName(Real));+ }+}diff --git a/src/wlr/wlr.zig b/src/wlr/wlr.zignew file mode 100644index 0000000..4bd40f2--- /dev/null+++ b/src/wlr/wlr.zig@@ -0,0 +1,129 @@+//! Facade over wlroots: the same `wlr.*` names callers already use,+//! migrated off zig-wlroots one subsystem at a time onto a module backed+//! directly by @cImport against the real wlroots headers (see the+//! "zig-wlroots" note in the top-level AGENTS.md for why, and+//! docs/agent-notes for the migration order). Everything below that+//! hasn't migrated yet forwards straight to the real zig-wlroots+//! dependency, imported here as `old`, so callers never see a difference+//! until a type actually moves off it.+const old = @import("old");++const output_power = @import("output_power.zig").Types(old.Output);+pub const OutputPowerManagerV1 = output_power.OutputPowerManagerV1;+pub const OutputPowerV1 = output_power.OutputPowerV1;++// --- Not yet migrated: forwarded straight to zig-wlroots. ---+//+// Box/FBox/Edges are drafted and verified against the real headers in+// box.zig/edges.zig, but NOT wired in here yet: Zig's extern structs are+// nominally typed, and OutputLayout.getBox, XdgToplevel.setTiled, and+// others still on `old` take/return *their* Box/Edges in their own+// signatures. Swapping Box/Edges alone makes those calls a hard type+// error. They migrate together with (or after) everything that+// references them in a public signature -- see the migration-order note+// in the plan. Until then they stay on `old` like everything else below.+pub const Box = old.Box;+pub const FBox = old.FBox;+pub const Edges = old.Edges;++pub const AddonSet = old.AddonSet;+pub const Allocator = old.Allocator;+pub const Backend = old.Backend;+pub const Buffer = old.Buffer;+pub const ColorTransform = old.ColorTransform;+pub const Compositor = old.Compositor;+pub const Cursor = old.Cursor;+pub const CursorShapeManagerV1 = old.CursorShapeManagerV1;+pub const DataControlManagerV1 = old.DataControlManagerV1;+pub const DataDeviceManager = old.DataDeviceManager;+pub const DataSource = old.DataSource;+pub const Drag = old.Drag;+pub const DrmFormat = old.DrmFormat;+pub const DrmSyncobjTimeline = old.DrmSyncobjTimeline;+pub const ExtDataControlManagerV1 = old.ExtDataControlManagerV1;+pub const ExtForeignToplevelHandleV1 = old.ExtForeignToplevelHandleV1;+pub const ExtForeignToplevelImageCaptureSourceManagerV1 = old.ExtForeignToplevelImageCaptureSourceManagerV1;+pub const ExtForeignToplevelListV1 = old.ExtForeignToplevelListV1;+pub const ExtImageCaptureSourceV1 = old.ExtImageCaptureSourceV1;+pub const ExtImageCopyCaptureFrameV1 = old.ExtImageCopyCaptureFrameV1;+pub const ExtImageCopyCaptureManagerV1 = old.ExtImageCopyCaptureManagerV1;+pub const ExtImageCopyCaptureSessionV1 = old.ExtImageCopyCaptureSessionV1;+pub const ExtOutputImageCaptureSourceManagerV1 = old.ExtOutputImageCaptureSourceManagerV1;+pub const ForeignToplevelHandleV1 = old.ForeignToplevelHandleV1;+pub const ForeignToplevelManagerV1 = old.ForeignToplevelManagerV1;+pub const FractionalScaleManagerV1 = old.FractionalScaleManagerV1;+pub const IdleInhibitManagerV1 = old.IdleInhibitManagerV1;+pub const IdleInhibitorV1 = old.IdleInhibitorV1;+pub const IdleNotifierV1 = old.IdleNotifierV1;+pub const InputDevice = old.InputDevice;+pub const InputMethodManagerV2 = old.InputMethodManagerV2;+pub const InputMethodV2 = old.InputMethodV2;+pub const InputPopupSurfaceV2 = old.InputPopupSurfaceV2;+pub const Keyboard = old.Keyboard;+pub const KeyboardShortcutsInhibitManagerV1 = old.KeyboardShortcutsInhibitManagerV1;+pub const KeyboardShortcutsInhibitorV1 = old.KeyboardShortcutsInhibitorV1;+pub const LayerShellV1 = old.LayerShellV1;+pub const LayerSurfaceV1 = old.LayerSurfaceV1;+pub const LinuxDmabufV1 = old.LinuxDmabufV1;+pub const LinuxDrmSyncobjManagerV1 = old.LinuxDrmSyncobjManagerV1;+pub const Output = old.Output;+pub const OutputConfigurationV1 = old.OutputConfigurationV1;+pub const OutputCursor = old.OutputCursor;+pub const OutputHeadV1 = old.OutputHeadV1;+pub const OutputLayout = old.OutputLayout;+pub const OutputManagerV1 = old.OutputManagerV1;+pub const Pointer = old.Pointer;+pub const PointerConstraintV1 = old.PointerConstraintV1;+pub const PointerConstraintsV1 = old.PointerConstraintsV1;+pub const PointerGesturesV1 = old.PointerGesturesV1;+pub const Presentation = old.Presentation;+pub const PrimarySelectionDeviceManagerV1 = old.PrimarySelectionDeviceManagerV1;+pub const RelativePointerManagerV1 = old.RelativePointerManagerV1;+pub const RenderPass = old.RenderPass;+pub const Renderer = old.Renderer;+pub const Scene = old.Scene;+pub const ScreencopyFrameV1 = old.ScreencopyFrameV1;+pub const ScreencopyManagerV1 = old.ScreencopyManagerV1;+pub const Seat = old.Seat;+pub const SecurityContextManagerV1 = old.SecurityContextManagerV1;+pub const Session = old.Session;+pub const SessionLockManagerV1 = old.SessionLockManagerV1;+pub const SessionLockSurfaceV1 = old.SessionLockSurfaceV1;+pub const SessionLockV1 = old.SessionLockV1;+pub const SinglePixelBufferManagerV1 = old.SinglePixelBufferManagerV1;+pub const Subcompositor = old.Subcompositor;+pub const Surface = old.Surface;+pub const Swapchain = old.Swapchain;+pub const Switch = old.Switch;+pub const Tablet = old.Tablet;+pub const TabletManagerV2 = old.TabletManagerV2;+pub const TabletPad = old.TabletPad;+pub const TabletTool = old.TabletTool;+pub const TabletV2Tablet = old.TabletV2Tablet;+pub const TabletV2TabletPad = old.TabletV2TabletPad;+pub const TabletV2TabletTool = old.TabletV2TabletTool;+pub const TextInputManagerV3 = old.TextInputManagerV3;+pub const TextInputV3 = old.TextInputV3;+pub const Texture = old.Texture;+pub const Touch = old.Touch;+pub const Viewporter = old.Viewporter;+pub const VirtualKeyboardManagerV1 = old.VirtualKeyboardManagerV1;+pub const VirtualKeyboardV1 = old.VirtualKeyboardV1;+pub const VirtualPointerManagerV1 = old.VirtualPointerManagerV1;+pub const XcursorManager = old.XcursorManager;+pub const XdgActivationTokenV1 = old.XdgActivationTokenV1;+pub const XdgActivationV1 = old.XdgActivationV1;+pub const XdgDecorationManagerV1 = old.XdgDecorationManagerV1;+pub const XdgOutputManagerV1 = old.XdgOutputManagerV1;+pub const XdgPopup = old.XdgPopup;+pub const XdgShell = old.XdgShell;+pub const XdgSurface = old.XdgSurface;+pub const XdgToplevel = old.XdgToplevel;+pub const XdgToplevelDecorationV1 = old.XdgToplevelDecorationV1;+pub const Xwayland = old.Xwayland;+pub const XwaylandSurface = old.XwaylandSurface;++pub const color = old.color;+pub const config = old.config;+pub const log = old.log;+pub const region = old.region;