Compositor: advertise wl_subcompositor and wl_data_device_manager so real clients (foot) load
CI / test (push) Successful in 59s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-24 18:40:24 -08:00
1 parent ae4f3fa93c
commit 3cb8417699
1 file changed
+32
+32
View File
@@ -34,6 +34,10 @@ enum ObjKind {
ObjKeyboard ObjKeyboard
ObjTouch ObjTouch
ObjOutput ObjOutput
ObjSubcompositor
ObjSubsurface
ObjDataManager
ObjDataObj
} }
///| ///|
@@ -205,6 +209,8 @@ fn emit_registry_globals(c : ClientConn, reg_id : UInt) -> Unit {
(4U, "zxdg_decoration_manager_v1", 1U), (4U, "zxdg_decoration_manager_v1", 1U),
(5U, "wl_seat", 7U), (5U, "wl_seat", 7U),
(6U, "wl_output", 4U), (6U, "wl_output", 4U),
(7U, "wl_subcompositor", 1U),
(8U, "wl_data_device_manager", 3U),
] ]
for g in globals { for g in globals {
let w = WireWriter::new() let w = WireWriter::new()
@@ -370,6 +376,10 @@ fn WaylandServer::dispatch_msg(
} else if iface == "wl_seat" { } else if iface == "wl_seat" {
c.objects.set(new_id, ObjSeat) c.objects.set(new_id, ObjSeat)
emit_seat_info(c, new_id) emit_seat_info(c, new_id)
} else if iface == "wl_data_device_manager" {
c.objects.set(new_id, ObjDataManager)
} else if iface == "wl_subcompositor" {
c.objects.set(new_id, ObjSubcompositor)
} else if iface == "wl_output" { } else if iface == "wl_output" {
c.objects.set(new_id, ObjOutput) c.objects.set(new_id, ObjOutput)
emit_output_info(c, new_id, self.output_w, self.output_h) emit_output_info(c, new_id, self.output_w, self.output_h)
@@ -461,6 +471,28 @@ fn WaylandServer::dispatch_msg(
} }
} }
} }
ObjSubcompositor =>
if opcode == 0U {
// destroy
c.objects.remove(obj_id)
send_delete_id(c, obj_id)
} else if opcode == 1U {
// get_subsurface(id: new_id, surface, parent): accepted, not composited yet
let sub_id = reader.u32()
c.objects.set(sub_id, ObjSubsurface)
}
ObjDataManager =>
if opcode == 0U || opcode == 1U {
// create_data_source / get_data_device: accepted, no selection support yet
let id = reader.u32()
c.objects.set(id, ObjDataObj)
}
ObjDataObj => ()
ObjSubsurface =>
if opcode == 0U {
c.objects.remove(obj_id)
send_delete_id(c, obj_id)
}
ObjShm => ObjShm =>
if opcode == 0U { if opcode == 0U {
// create_pool(id: new_id, fd: out-of-band, size: i32) // create_pool(id: new_id, fd: out-of-band, size: i32)