From 01fc2f128d1002b430b273dbee4392bd115a2ca1 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sat, 28 Feb 2026 14:40:45 +0100 Subject: [PATCH] xml-to-wire: fix handling of new_id without interface --- wire/wl_registry.txt | 2 +- xml-to-wire/src/builder.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wire/wl_registry.txt b/wire/wl_registry.txt index b951da0f..64433d32 100644 --- a/wire/wl_registry.txt +++ b/wire/wl_registry.txt @@ -2,7 +2,7 @@ request bind { name: u32, interface: str, version: u32, - id: id(object), + id: id(object) (new), } event global { diff --git a/xml-to-wire/src/builder.rs b/xml-to-wire/src/builder.rs index ec7ce457..c3438bd9 100644 --- a/xml-to-wire/src/builder.rs +++ b/xml-to-wire/src/builder.rs @@ -90,6 +90,10 @@ fn handle_file_(path: &str) -> Result<(), BuilderError> { args.next(); continue; } + if arg.ty == ArgType::NewId && arg.interface.is_none() { + writeln!(file, " interface: str,")?; + writeln!(file, " version: u32,")?; + } write!(file, " {}: ", arg.name)?; 'ty: { let ty = match arg.ty {