The nested window is an xdg_toplevel client inside labwc, but tabbed-
wlroots never bound xdg-decoration-unstable-v1, so labwc added no title
bar. Generate the client protocol (wayland-scanner), register it in the
Makefile, and after creating the host toplevel request SERVER_SIDE mode
so labwc draws a real host title bar above the nested content. Adds an
informational configure listener that reports the effective mode.
For clients (kitty/foot) that reserve a titlebar gutter above their
content but never paint it, that area showed as a dark bar while their
content sat low enough that the bottom row/cursor was pushed out the
output edge. Shift such clients up by the gutter so the dark bar is
cropped away instead of the terminal's bottom. Clients with no gutter
(geometry.y >= 0, e.g. the shm test client) are left untouched.
On a headless backend wlr_allocator_autocreate yields a shm allocator,
so the scene swapchain buffer is shm, not a dmabuf. import_scene_buffer
only handled dmabufs, so the composited scene never reached the host
window. kitty only worked via accidental direct scanout of its own
dmabuf buffer.
Add a full-output background scene_rect so the render list always has
more than one entry (disabling single-buffer direct scanout), and add a
CPU-read fallback to import_scene_buffer for non-dmabuf buffers. Now the
whole window composites through for both shm and dmabuf clients, with
content reaching the exact bottom edge.
Periodic dumps filled /tmp with 3MB PPMs and stopped working once the
swapchain stopped being ARGB8888 dmabufs. Capture the presented host
EGL window with glReadPixels instead, triggered on demand with
kill -USR1 <pid>.
Nested compositor running on the wlroots 0.19 headless backend with a
host EGL window on labwc. Clients are always maximized to the host
content area and keyboard input is delivered via the seat (tinywl
pattern). Closing the last tab closes the host window and exits.
Track sub-surface roles and positions via the wl_subcompositor so foot's
client-side decorations render: toplevel -> titlebar -> controls. Draw the
active surface's buffer at the window-geometry offset and its sub-surfaces
recursively on top, clipping to the window. Sub-surface commits of the active
tab trigger redraws but never resize the host window.
Blit client buffers from their top-left origin instead of honoring
set_window_geometry offsets: clients like foot set a geometry that
extends above the buffer (CSD shadow, geom_y < 0), which made the
source row pointer start before the buffer and produced a blank
frame. Buffers are now copied 1:1 from origin, capped to canvas.
Also dispatch wl_callback.done on the first configure commit so
frame-throttled clients (foot) don't stall waiting for it.
Single-file Wayland compositor presenting client surfaces as tabs in a
GTK3 window. Implements wl_compositor, wl_shm/shared memory, xdg-shell,
wl_seat/keyboard/pointer, and launches apps from tab-commands.
- Validate client buffer geometry against pool size at create_buffer and
commit time to prevent out-of-bounds reads from malformed buffers.
- Release client shm buffers immediately after deep-copying pixels,
replacing the fragile foot/GTK3 deferred-release state machine.