Introduce struct wl_toplevel_view with map/unmap/destroy wl_signal
listeners and a synthetic WNativeWindow ID (>= 0x10000000).
Implement context_save/find/delete as a per-key linked list of
(WNativeWindow, void*) entries — enables downstream policy code to
look up views by handle. wl-smoke-test now verifies "toplevel mapped"
appears in compositor stderr when weston-simple-shm creates its surface.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the output frame listener + render pipeline approach (which
required a swapchain allocator) with a simple wl_event_loop timer that
calls wlr_output_send_frame every 16 ms. Clients (weston-simple-shm)
now complete their render loops without the compositor needing a GPU
allocator. Also schedule an initial xdg_surface configure on new
toplevels so they can commit their first buffer. wl-smoke-test verifies
weston-simple-shm runs for 3 s without crashing the compositor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Advertise wl_shm (via wlr_renderer_init_wl_shm) and expose the headless
output as a wl_output global so SHM buffer clients can render. Wire up
the xdg_shell new_surface listener to track incoming XDG toplevels
(management hook placeholder). wl-smoke-test now verifies wl_shm and
wl_output in the registry and that weston-simple-shm can connect without
crashing the compositor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Register wl_compositor (+ wl_subcompositor), wl_seat, wl_data_device_manager,
and xdg_wm_base in the compositor's global registry so that Wayland clients
can enumerate and bind them. Add generated xdg-shell-protocol.{h,c} from
wayland-scanner. wl-smoke-test now uses weston-info to verify all three
key globals are present.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Create the compositor UNIX socket via wl_display_add_socket_auto so
Wayland clients can connect; store socket name and set WAYLAND_DISPLAY.
Add wlr_output_layout for multi-head tracking and implement monitors_query
to return real 1920x1080 head geometry from the headless output.
wl-smoke-test now verifies the socket file exists in XDG_RUNTIME_DIR.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add display_default_screen, atom_intern, and event_loop_run vtable slots.
Guard all X11-only paths in startup.c/screen.c/shutdown.c/event.c/xdnd.c
with if (!dpy) so the Wayland path reaches wl_display_run() and exits
cleanly (exit 0) on SIGTERM. wl-smoke-test.sh now PASSES.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- startup.c: include wl_backend.h when USE_WAYLAND_BACKEND is defined;
select wl_backend when WMAKER_USE_WAYLAND env var is set, otherwise
fall back to x11_backend (no-op for non-Wayland builds)
- tests/smoke-test.sh renamed to tests/x11-smoke-test.sh (X11-only path)
- tests/wl-smoke-test.sh: new Wayland smoke test; currently verifies
wl_backend symbol presence and wlroots linkage; headless compositor
tests will be added as vtable slots are implemented
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>