Commit graph

138 commits

Author SHA1 Message Date
a2b7802ec1 fix: three startup/session crashers exposed by eager hosts and real use
tabs/mru lists init before host_init (sync configure walked garbage); EGL init keeps configured host size (swapchain desync abort); overlay sentinel bump snapshots size (shrank 1px/call to zero, then aborted). Adds motion-burst regression test.
2026-09-12 07:53:02 +10:00
f4cd5f7f92 fix: break sweep loop after tab removal; asan-gate defaults 2026-09-11 09:12:58 +10:00
16c5ed58e5 test: locked abs-pointer pin, rogue second lock surface; fix wltest abs gating 2026-09-11 08:37:27 +10:00
f58418b70d test: tier-2 harness coverage, bell, IME grab/popup, request round-trips, libdecor boot 2026-09-10 11:57:13 +10:00
3a194104a3 test: synth feed drives real host pointer/touch listeners 2026-09-10 10:58:22 +10:00
1a77721177 test: Take _ensure_build out of test_smoke.
- It didn't work with pytest xdist.
- The AI sometimes forgets to build before testing, but it is rare.
2026-09-10 08:52:47 +10:00
6b4418ae4f feat: serve xdg-decoration-v1 pinned client-side
Every tab is maximized and kick draws no frames, so new toplevels
are pinned to client-side mode (headerbars keep working) and later
server-side requests are ignored. Pinning happens at map -- set_mode
asserts on a never-committed surface, and decoration-before-commit is
the normal order (calling it in new_toplevel_decoration aborts
wlroots); late binds pin immediately when already initialized.

Adds an xdeco probe (maps one shm-backed toplevel, reports the
configured mode) with a regression test asserting mode=1, tracks it
in build.sh staleness, and covers the global in protocol_globals.
Full suite: 153 passed, 2 skipped.
2026-09-10 03:08:18 +10:00
8bdaa970cc feat: advertise alpha-modifier-v1 (passive surface alpha) 2026-09-10 02:30:55 +10:00
33526c7a4e test: unify _wait_log into Session.wait_for (phase 6)
All 16 assert _wait_log(s, rx, timeout) sites become s.wait_for(rx,
timeout); every caller only asserted truthiness, and both poll the
whole log identically, so behavior is unchanged (failures now report
the pattern plus a log tail instead of a custom one-liner). Sites on
_wait_log's 15s default keep timeout=15.0 explicitly since wait_for
defaults to 20s. The helper is deleted. Full suite: 152 passed,
2 skipped.
2026-09-10 02:10:01 +10:00
838876ff65 test: factor skip guards into _require_* helpers (phase 5)
30 host-Wayland, 6 Xwayland and 5 helper-binary skip guards become
_require_host_wayland() / _require_xwayland() / _require_file(path,
reason). Binary checks keep their own triage messages; os.access
checks and skipif/flaky markers are untouched. Full suite: 152
passed, 2 skipped.
2026-09-10 01:55:51 +10:00
f10fff910c test: factor throwaway wltest clients into _run_wl_client (phase 4)
9 uniform throwaway-client sites (late/tag, third tab, globals
prober, layer bars x2, foreign requester, takeover locker, modifiers
and popup-reposition oneshots) go from Popen + try/finally
terminate/wait to with _run_wl_client(sock, *args, **kw):. Deliberately
untouched: host-side wl-copy (host DISPLAY env), frame/menu X11 pairs
and popup a/b (shared/explicit mid-body lifecycles), the probe (custom
DISPLAY + log-file stdio), and the _oneshot_*/_poll_* helpers.
Full suite: 152 passed, 2 skipped.
2026-09-10 01:49:37 +10:00
40be266329 test: factor liveness/crash asserts into helpers (phase 3)
146 assert X.proc.poll() is None spellings (bare, log-tail tails of
varying length, custom operation messages) become _assert_alive(s,
msg): custom messages are preserved up front, the log tail is always
attached. The 4 crash-indicator loops become _assert_no_crash(log)
over the union tuple. Full suite: 152 passed, 2 skipped.
2026-09-09 23:41:00 +10:00
12b7b263bc test: realign paren continuations in with _run_* calls
Mechanical whitespace-only follow-up to phases 1-2: continuation
lines that were paren-aligned to the old s = _spawn_* heads now align
to the with _run_* heads. Verified with git diff -w (empty).
2026-09-09 23:35:30 +10:00
1d3ae67dd8 test: factor out-file polling loops into _wait_out (phase 2)
28 deadline/while/exists polling loops become one-line
assert _wait_out(path, contains, timeout) calls; the helper retries
empty/partial reads and survives exists/read races, and callers keep
their own assert messages (including the live '(missing)' payload
diagnostics). Deliberately untouched: in-loop liveness asserts
(fail-fast under load), pixel/dump/log-touch loops, line-count gates,
XWayland DISPLAY export loops, and the _oneshot_*/_poll_* helpers.
Full suite: 152 passed, 2 skipped.
2026-09-09 23:32:30 +10:00
c9a7fb813b test: factor spawn/close into _run_* context managers (phase 1)
101 single-session sites go from s = _spawn_* + try/finally
s.close() to with _run_*() as s:. Standard boot preambles fold into
wait= (any/any_frame/app0/app0_mapped). Client-cleanup tails are kept
as inner try/finally so kill order is unchanged; the dead
if poll() is None: terminate() after close() is dropped (close already
terminate+wait/kills). Fixtures, kick-in-kick outer/inner pairs and
_run_* internals are untouched. Full suite: 152 passed, 2 skipped.
2026-09-09 23:25:19 +10:00
04e056518a x11: instrument pending-associate/classify chain; mark ready_and_claim flaky
Deeper-X11 instrumentation (permanent, DEBUG): every associate event
now logs surface null/mapped/hooked state, classify logs wid/xpid/pgid
at entry, and pending-map has its own line -- closing the blind spot
between xwm pairing and tab claim.  Plus kick_monotonic_ms() timestamps
on the new lines for stall measurement (prefix-safe for all test
regexes).

Paid off immediately: two stalls autopsied to paired-but-never-mapped
wlr_surfaces (associate ran with surface mapped=0, no map for 15-30s,
classify never invoked -- proven by the absent entry line).  The stall
is therefore upstream of kick classification (X MapNotify delivery /
xwm mapping under -n15), not in it; locating it further needs live
capture during a stall, not post-hoc logs.

test_xwayland_ready_and_claim failed once the same way (paired xmessage
surface never mapped within 15s): marked flaky per the seen-it rule
(passes serially).
2026-09-09 22:31:46 +10:00
52d12bdf2e test: xwayland_alt_delete waits for the reaped launcher, not a fixed poll
The 15s os.kill poll asked for trouble (fixed window on a foreign event
loop).  Replaced with kick's own SIGCHLD reap line ([child] pid N
exited, written unbuffered per reaped child) -- the same signal, event
anchored, 30s backstop only.

Two bugs found along the way, both in the test not the product:
- claim pid != reaped pid (sh -c forks; the claim is the grandchild,
  the reap is the direct-child launcher) -- wait on [launch] app=0's pid.
- [child] uses 'pid ' (space) vs [launch]/[claim] 'pid=' -- the first
  version of this wait matched nothing for 30s, deterministically.
  (Also: earlier validation runs silently deselected this marked test;
  always pass -m flaky when validating marked tests.)

Unmarked after 12/12 at -n15 + serial green.
2026-09-09 21:59:56 +10:00
5ffc051940 test: event-driven hold-to-repeat tests (no wall-clock rate); mark xwayland_alt_delete
hold_alt_down_repeats + alt_tab_hold_repeats asserted repeat COUNTS in
fixed windows -- pure wall-clock.  Now: press -> wait [repeat] start
(new DEBUG lifecycle lines in kbd_repeat_start/cancel; stop logged only
when disarming a live timer) -> wait for ONE synthesized repeat
(count-based, unbounded time) -> release -> wait [repeat] stop ->
immediate count assert (no timer exists post-disarm, so no silence
window needed).  Generous timeouts bound hangs only; slow boxes take
longer without failing a rate.  hold_alt unmarked (6/6 at -n15).

xwayland_alt_delete_closes_x11_tab: 1 failure in 13 runs, no body --
marked flaky per the seen-it rule.

Evidence: -n15 gate clean (153 passed), serial gate clean (153).
2026-09-09 13:30:19 +10:00
e398f90b12 test: migrate host-timed tests to private kick-in-kick hosts; flock clipboard
The 7 host-timed tests failed not (only) on timeouts: autopsy showed
parallel workers stealing each other's live-host clipboard (wl-paste
returns another test's token -- no timeout survives that).

Clipboard x3: the failure is cross-talk on ONE shared host clipboard.
Serialize just those sections with an flock file across xdist workers
(the 45s polls stay as backstops for genuine host slowness -- marks
kept; focus-based backend still needs the real host).

Fullscreen x3 + cursor-shape: migrate to per-test outer-kick hosts
(same xdg/fullscreen/shape protocols, deterministic compositor instead
of GNOME).  No coverage lost (single code path; timing was the only
host variable).  cursor-shape uses deterministic warp-enter; fullscreen
uses tap/chord acks.  Added KICK_REPEAT_DELAY_MS + extra_args to
_spawn_nested_in.  Unmarked after -n15 validation.

hold_alt stays (wall-clock timer).

Evidence: -n15 gate 3x clean (152 passed), serial gate clean (152),
migrated tests 6/6 at -n15.  12 -> 7 flaky.
2026-09-09 13:03:10 +10:00
0babe8832e fix: survive Xwayland SIGKILL without aborting (detach X surface listeners)
Killing the embedded Xwayland server aborted the compositor:
surface_handle_resource_destroy assert (non-empty map listener list)
via wl_client_destroy in the main loop's flush_clients.

Mechanism: the dead server's Wayland client connection is purged before
wlroots' xwm cascade dissociates anything, so wlr_surfaces die with our
map/unmap/commit listeners still attached.

Fix: watch the Xwayland Wayland client (its destroy signal fires before
its resources are purged) and proactively detach surface listeners only
-- across claimed windows, override-redirect windows and unclaimed
pendings -- leaving xsurface-level listeners for the later tab teardown.
Idempotent; later dissociate/xsurface-destroy find clean flags.  The
restart test now also waits for the X11 window's map before killing, so
the crash path (listeners attached at death) is deterministically
exercised instead of raced.

Also re-mark output_mgmt_apply flaky (1 post-fix assertion under -n15;
budgets help but the modeset roundtrip stays load-sensitive).

Evidence: restart test 12/12 at the -n15 repro config (was ~2/9
crashing), detach handler firing on every server death, -n15 gate
clean, serial gate clean (148), flaky set green (11).
2026-09-09 12:23:56 +10:00
dcd6552533 test: fix dead_command, output_mgmt, gestures, xreqs; mark restart/leader/popup flaky
Fixed + unmarked (all green serially, holding at -n15):
- dead_command: wait for the exit line (event) before proc.wait instead
  of a fixed 10s reap timeout.
- output_mgmt_apply: phase on the existing [output] apply line so the
  commit wait covers only client reconfigure lag (30s budgets).
- gestures_roundtrip: cursor-line + [gesture] forward-line acks per
  sequence (offset), single client-file poll; no more resend-on-slow.
- x11_client_requests_driven: phased [xwayland] ready wait (own budget)
  + startup-crown settle/nav.

Hardened, marks kept (host-timed roundtrips): 3 fullscreen tests use
tap_ack/chord_ack + 30s host-configure waits.

Marked flaky (post-fix sightings under load):
- x11_menu_popup (associate never lands in X11-heavy -n15 runs),
- x11_leader (1 claim timeout post-fix),
- xwayland_server_restart_survived (real SIGSEGV in
  wl_display_flush_clients on Xwayland SIGKILL restart -- pre-existing
  race, unrelated to this work; needs a proper fix, not a test tweak).

Net flaky 14 -> 11. Evidence: -n15 gate 2x clean (148 passed),
serial gate clean, flaky set green serially.
2026-09-09 11:49:51 +10:00
f31b781d61 test: mark dead_command, x11_requests_driven, x11_leader, output_mgmt_apply flaky
All four observed failing under parallel load (X11 client startup /
claim races, dead-command explanation timeout, output-mgmt modeset
roundtrip); all pass serially. 14 flaky total.
2026-09-09 10:40:11 +10:00
321a02e1bf test: mark x11_menu_popup flaky; convert remaining fixed sleeps
test_x11_menu_popup_attaches_as_member failed 3x under parallel load
with no diagnosed mechanism: marked flaky per the seen-it-fail rule
(10 flaky total; all pass serially).

Sleep follow-up: fixed sleeps 131 -> 112 (-26 assertion-guarding,
+poll intervals).  Converted the safe remainder with the same
techniques -- cursor-line waits for pointer baselines, tap_ack quorums
for absence guards (function keys, plain keys, minimize/move/resize),
client-file polling for the maximize-refusal roundtrip, dropped the
now-vacuous reorder sleep (consumed chords + stretched repeats leave no
async transition source).  Left deliberately: wall-clock timers (idle,
hold-settle), teardown-survival settles in stable tests, X11 structural
sleeps, rate-limit pokes, poll intervals.

Verified: -n15 gate clean 4x (149 passed), -n15 full run fails only the
10 pre-marked flaky, flaky set green serially.
2026-09-09 10:07:26 +10:00
49612cf992 test: fix (not mark) time-sensitive tests -- full rollout (38 -> 9 flaky)
Mechanisms found by autopsying failing sessions' logs, each fixed with
logging + event-anchored waits instead of sleeps/fixed assumptions:

- Input-consumed acks: new Session.tap_ack/chord_ack snapshot the log
  offset BEFORE sending (send-then-snapshot races a descheduled test and
  misses its own line) and wait for the existing [kbd] press line.
  wait_for_new_after covers release-side effects ([mru] commit).
- Wall-clock repeats displacing exact MRU/cycle/reorder state: a tap whose
  press/release processing spans the 600ms repeat delay catches synthesized
  repeats (autopsied: 3 preview steps from 1 press).  KICK_REPEAT_DELAY_MS
  env override (default 600); all test sessions stretch to 60s except the
  two hold-to-repeat tests, which get private sessions with real repeats.
- Startup-crown flips (last mapper promotes itself): all crown reads
  settled (both maps = quiescence) + relative navigation; black-tab crowns
  log [diag] active slot= (no active app= line) -- waited accordingly.
- Title/data decoupling: [title] now emitted at data sources (map-end with
  final title, post-refocus destroy, renames, focus promotion, subcycle,
  tag-group join), not just overlay draws; premature claim-time hook tried
  and reverted (wrong pick poisons the dedup cache).
- Pointer tests: new [cursor] pos= DEBUG line on warp/motion; dump-poll
  loops become cursor-line + single-dump asserts.  Also fixed a latent
  _spawn_standalone bug: env -i dropped KICK_DUMP_DIR, so parallel
  standalone sessions shared /tmp/host_N.ppm and read each other's dumps.
- Spawn races: _nested_session/no_args retry instant client death.
- X11/layer/modal: settle+nav, map-anchored claims, content dump-polls,
  settle-poll instead of fixed sleeps.

Genuine product race fixed: fork->setpgid window let SIGCHLD-driven
sweep_dead_startup_groups conclude ESRCH on a not-yet-existing group and
drop a LIVE tab (orphaned sleep survivors found on the box).  Parent-side
setpgid + pid-liveness double-check before sweeping.

Remaining 9 flaky (wall-clock timers, host-compositor roundtrips):
gestures, hold_alt, fullscreen x3, clipboard host x3, cursor-shape.

Evidence: -n10 clean 5x (150 passed, ~28s), serial clean (150 passed),
flaky set green (9 passed).
2026-09-09 08:17:55 +10:00
28210eb285 test: fix (not mark) time-sensitive tests -- pilot of the logging technique
Pilot A (input-consumed signal): test_close_black_tab_active_last waits
for [kbd] key=111 state=1 after the chord, proving the compositor
consumed the key before waiting for the effect.  Unmarked flaky.

Pilot B (data-source logging): [title] was only emitted from overlay
draw passes, so title tests needed Alt held + live frames.  tab_row_title
is now also called at the data-source points where the topmost window's
title can change -- end of the map handler (first commit carries the
final title with tab assigned and focus settled), after refocus in
window_destroy_common, on set_title renames, and on the focus-promotion
path -- so row titles are log-observable with no overlay frames.
test_sub_windows_stack_mode_row_title_follows_top drops the Alt hold and
is unmarked.  (A premature hook at claim time was tried and reverted: the
title has not arrived yet there, and resolving with the wrong pick
poisons that window's dedup cache and kills the later fallback line.)

Startup-crown races (found when full-suite validation failed 9-19 tests
that pass in isolation): each tab's first map promotes it, so under load
the LAST mapper steals the crown and neither the transient
wait_any_active read nor 'settled crown == 1' holds.  Five tests now
settle (both tabs mapped = quiescence: no more first-maps, no more
promotions) and navigate relatively: alt_tab_walks/commit/1/repeats and
the sigkill-trap test.

-n10 clean 3x (123 passed, ~21s); serial clean (123 passed).
2026-09-08 22:26:30 +10:00
d8332db375 test: de-flake the suite for parallel runs (-n10 clean 4x, ~25s)
Parallel runs (-n10, needed since -n20 overwhelms the desktop
compositor) exposed load-sensitive tests as failures. Fix the
fixable, mark the rest flaky (all marked tests pass serially;
./test.sh -m flaky stays green in ~33s):

Systemic fixes (free on success -- poll loops exit early):
- Session poll-loop timeouts retuned for loaded boxes: wait_for
  15->20s, wait_any_active/active_frame 10->20s, wait_app_active/
  wait_surface_mapped 10->15s, wait_active/change 3->10s,
  cycle_ack 5->15s; drop explicit 3s waits onto the new defaults.
- Startup-crown race: wait_any_active could catch a transient crown
  while the other tab was still pending, so four tests now settle
  both maps before reading the crown; alt_shift_t quiesces maps
  before snapshotting the transition count.
- Pointer-constraint and output-mgmt poll deadlines 5/20->15/30s
  (per-iteration dump+parse cost under load, not logic).

Flaky marks (all pass serially; fail only via load timing -- key
chords/taps landing in shifted state, overlay/pixel timing, host
roundtrips over the shared desktop compositor, X11 startup races,
repeat-rate wall clocks, multi-client dances):
hold_alt, arrows_reorder, sub_windows x4, fullscreen x3,
clipboard x3, pointer x3, screen_mode, layer x2, x11 x3,
startup-crown, modal, quit, plain_delete, cycle_wraps,
function_keys, alt_delete x2, tab_death, gestures_roundtrip,
modifier_super, no_args, alt_shift_move, close_black_tab,
output_mgmt_apply, screen_mode_sets_output_size.
2026-09-08 13:38:47 +10:00
7e2bb18a85 test: parallel-safe suite (xdist), shared globals session, KICK_DUMP_DIR
Make ./test.sh -n4 work (~47s vs ~156s serial):

- kick.c: KICK_DUMP_DIR env override for frame-dump .ppm paths
  (default /tmp); per-boot dump_seq counters no longer collide
  across concurrent compositors.
- tests: every spawn gets a unique log file and a per-session dump
  directory owned by the Session (close removes the tree instead of
  globbing /tmp, which raced parallel workers' live dumps).
- 14 protocol-globals tests share one module-scoped keeper session
  via short-lived --globals-out clients instead of 14 boots.
- Two presence-waits converted from fixed sleeps to event waits.
- Harden the fullscreen round-trip: wait for seat keyboard focus
  ([diag] kbd-enter, new debug line in window_enter) before tapping
  F -- map alone does not guarantee enter under load and the tap was
  silently dropped.

Serial remains the deterministic gate (documented in test.sh and
README): a few pre-existing timing-sensitive tests can still flake
under parallel load; they pass alone and serially.
2026-09-08 12:02:02 +10:00
a593d83b37 tests: drive kick sockets over ext-data-control instead of wl-clipboard
Stock wl-clipboard only speaks the legacy zwlr_data_control protocol
kick no longer offers (removed in wlroots 0.20), and its wl_data_device
fallback needs a focus serial a surfaceless tool never receives, so the
six clipboard tests poll-timed-out on hosts where kick is the data-control
endpoint (e.g. labwc).

wltest gains --clipboard-set/--clipboard-demand-expect,
--dc-primary-set/--dc-primary-demand-expect and --dc-clear over
ext-data-control-v1 (no focus or serial needed; setters exit 0 on
cancel like wl-copy -f), and the tests use them on kick sockets while
wl-copy/wl-paste stay on the real-host side.
2026-09-08 11:19:22 +10:00
f146cd5d1b test: share one compositor across globals tests, per-spawn logs
Booting a fresh kick per globals assertion wastes a spawn each for
zero benefit: the advertised global set is static and these tests read
only the --globals-out file. A module-scoped globals_session fixture
boots one keeper compositor; each of the 11 globals tests runs a
short-lived --globals-out client against its socket instead
(11 spawns -> 1).

Groundwork for future parallel runs: every spawn now gets a unique
log file (_fresh_log) instead of sharing /tmp/tabtest.log, so workers
can no longer unlink or interleave each other's logs.

Also convert two presence-waits from fixed sleeps to event waits
(x11 popup attach waits for the associate line; maximize-refusal waits
for the first configure line): faster and immune to latency under
load. Crash-guard and timeout-crossing sleeps are deliberately
untouched.
2026-09-08 10:54:51 +10:00
7c77a3beaf feat: implement wl_fixes, xdg-toplevel-tag, color-representation (wlroots 0.20)
Three of the four protocols new in wlroots 0.20 (ext-workspace has no
meaningful mapping onto kick's tab model, so it stays out):

- wl_fixes (core, v1): advertise the global; wlroots serves
  destroy_registry itself. Clients like Firefox use it to tear down
  registries without tripping protocol errors.

- xdg-toplevel-tag-v1: record each window's tag + translated
  description ([tag] log line per change), show 'title [tag]' in the
  overlay, and with --tab-groups on stack an unmapped external window
  onto the tab whose window carries the same tag (browser-style tag
  groups). Tags arriving before claim wait in a pending list keyed by
  toplevel; mapped windows never move.

- color-representation-v1: advertise an explicit SDR sRGB set
  (premultiplied-electrical alpha, identity coefficients in full
  range) rather than the renderer's query, which reports empty on
  GLES2; wlroots validates client values against it.

Tests: wltest gains --tag-set/--tag-desc and --color-probe/--color-out
(bind-time listener, since the manager bursts on bind); the globals
test covers all three new globals; new tag, tag-grouping and color
round-trip tests; README documents all three.
2026-09-08 10:22:50 +10:00
ccbc782177 migrate screen capture from wlr-screencopy to ext-image-copy-capture
The wlr-screencopy unstable protocol is deprecated; its superseding
staging protocols ext-image-copy-capture-v1 and
ext-image-capture-source-v1 ship in wayland-protocols.  Migrate:

- advertise wlr_ext_image_copy_capture_manager_v1 and
  wlr_ext_output_image_capture_source_manager_v1 instead of the
  wlr_screencopy_manager_v1 global (wlroots runs the whole session/frame
  flow off the output commit path, so no listener wiring is needed)
- rewrite wltest --screencopy for the new client flow: bind the capture
  managers, create an output capture source, open a copy-capture session,
  wait for the constraint batch (buffer_size/shm_format/done), then attach
  a shm buffer and ask for one frame
- generate the two client stubs from wayland-protocols and drop the
  bundled wlr-screencopy-unstable-v1.xml
- update the globals test to the new interface names

Existing wl_data_device-based clipboard bridge code is unaffected.
2026-09-08 06:49:39 +10:00
592a2a036e migrate clipboard bridge from wlr-data-control to ext-data-control
The wlr-data-control unstable protocol is deprecated; its superseding
staging protocol ext-data-control-v1 ships in wayland-protocols.
Migrate the host-side clipboard/primary bridge to it:

- bind ext_data_control_manager_v1 version 1 instead of zwlr_manager
  (ext-data-control v1 always supports primary selection, so the
  dc_primary_supported gate is dropped and the registry bind is plain)
- rename all zwlr_data_control_* to ext_data_control_* types/calls
- generate ext-data-control-v1 from wayland-protocols and drop the
  bundled wlr-data-control-unstable-v1.xml
- update README and test log-message expectations

wltest --screencopy is unaffected; the screencopy migration is separate.
2026-09-08 00:37:52 +10:00
1f35f90a95 Alt+Tab / Alt+1 walks a window-level MRU stack, commits on release
Prefix+Tab and prefix+1 preview the session's windows most-recently-used
first: each press steps to the next window after the shown one in server.mru
order, wrapping at the bottom, without mutating the stack until the modifier
is released. Releasing after navigating commits the shown window to the
front; a bare hold leaves the order untouched. Focus changes with the
modifier up move the entered window to the front immediately.

Alt+1 is the chord that survives hosts like GNOME, which grab Alt+Tab,
Alt+Esc and Alt+Backtick (the latter via the metacity-era switch_group
default) before a nested compositor ever sees them; Alt+Tab is kept for
hosts that leave it free. Windows join the stack least-recent on allocation
and are removed on teardown; reachable stops mirror cycle_tab (live or
pending-claim, not closing). Holding the chord repeats via the existing
synthesized-repeat machinery.

Tests cover stepping, commit-on-release, the Alt+1 synonym, and hold-to-
repeat.
2026-09-06 23:52:03 +10:00
ca7f1f2852 tests: cover quit dialog, constraint/text-input/dialog teardown, virtual abs+mods, mgmt probe 2026-09-05 10:59:49 +10:00
32de4866a6 tests: cover X11 requests, OR move, Xwayland restart, idle release; fix inhibitor destroy 2026-09-05 10:24:49 +10:00
b004cfb66c tests: cover data-control clipboard/primary bridge via kick-in-kick; ignore SIGPIPE 2026-09-04 20:47:12 +10:00
7d2bda5800 tests: cover overlay icon desktop/PNG/SVG/absolute/missing paths 2026-09-04 20:20:44 +10:00
3446b79bb3 session-lock: drop finished lock on unlock so retakeover works; cover unlock teardown 2026-09-04 20:16:45 +10:00
7955e98150 tests: cover taskbar activate/maximize/fullscreen requests 2026-09-04 19:57:15 +10:00
b0858e15be tests: cover client maximize/minimize/move/resize, popup reposition, true SIGKILL escalation 2026-09-04 19:49:08 +10:00
21becaf17b coverage: gcc/gcov line coverage of kick.c unioned over the suite 2026-09-04 18:13:32 +10:00
9d1e3e802c smoke tests: gate on surface map / painted frame before capture
Two more tests had the same latent race fixed for
test_standalone_headless_virtual_pointer_motion_click: injecting an
end-to-end capture too soon after wait_any_active/[claim], when the
surface may not be mapped/composited yet, so the event/capture is
silently lost under load.

- test_touch_delivery_to_client: dropped its time.sleep(1.0) and now
  waits on wait_surface_mapped(0) before the touch down/motion/up, so a
  pick never races surface mapping.
- test_standalone_headless_output_power_blank: waits on
  wait_active_frame() before the baseline screencopy, so the ',content'
  assert never sees the pre-map black placeholder.
2026-09-04 12:27:41 +10:00
7194e59e8c smoke test: wait for surface map before virtual pointer motion/click
test_standalone_headless_virtual_pointer_motion_click fired its virtual
pointer motion+click straight after wait_any_active, which only means the
window object exists -- before its Wayland surface has necessarily mapped
(still the black placeholder, surface=0x0).  A pointer event landing
before the surface maps reaches no surface, so --pointer-out logged no
'enter'/'button' and the test intermittently failed under load (the race
documented in wait_surface_mapped).  Wait on the [diag] map line first,
matching the other input-injecting tests.
2026-09-04 12:21:37 +10:00
05c3e5dd2b tests: anchor layer bars left+right so they map
A zero width without the opposite edge anchors is a protocol error,
so wlroots killed the test bar before it mapped and the exclusive
test failed (800 -> 800) while the zero-exclusive sibling passed
vacuously. Both bars now anchor left+right, the zero-exclusive test
asserts [layer] map so it cannot pass without a mapped bar, and
wltest documents the anchor rule.
2026-09-04 11:05:26 +10:00
d8164ce315 protocols: expose output-management, honor resizes standalone
Advertise zwlr_output_manager_v1 with the single head, published on
setup and re-published from the commit path whenever the size lands
(resizes apply lazily, so the commit -- not the request -- is where
the new size becomes observable).

Client sizes apply standalone through the normal resize path (tabs
reflow, swapchain follows); nested refuses anything but the live
size since the host owns the geometry. Disabling, scale and
transform changes are refused; superseded configs are destroyed
after feedback.

Standalone output_resize now owns the canvas size so client resizes
reach the lazy modeset. wltest gains --output-mgmt; smoke tests
cover the global, head listing, and an 800x600 apply with tab
reflow.
2026-09-04 10:52:16 +10:00
fcd3bca53b protocols: prefer xdg-toplevel-icon artwork in the overlay
Advertise xdg_toplevel_icon_manager_v1 (28px, the overlay draw size)
and use the largest uploaded buffer as the tab's overlay texture.
The desktop-file guesser stays as the fallback -- and the only source
for X11 windows -- so every window still gets an icon; clearing the
icon drops back to guessing.

wltest gains --icon; smoke tests cover the global and the end-to-end
protocol-icon preference.
2026-09-04 10:35:34 +10:00
50a660860d protocols: honor tearing hints and fractional scale
Drive the output commit's async-flip flag from the shown surface's
tearing hint (a real tearing flip on DRM; correctly ignored on
headless/nested), with per-object hint tracking that requests a frame
on change. Notify each surface of the output scale at claim so
clients never guess preferred_scale.

wltest gains --tearing and --fractional-out (plus linking the two
protocol stubs it now uses); smoke tests cover the async commit
transition and the notified scale value.
2026-09-04 10:21:30 +10:00
8a71a062ce protocols: forward pointer-gestures swipe/pinch/hold
Advertise zwp_pointer_gestures_v1 (v3, with hold) and fan libinput
touchpad gestures out to the client holding seat pointer focus.
The stdin test feed gains swipe/pinch/hold messages driving the same
forwarders in any mode (nested has no host gesture source).

wltest gains --gesture-log plus swipe/pinch/hold feed helpers; smoke
tests cover the global and an exact-value round trip of every gesture
and cancel path.
2026-09-04 10:13:13 +10:00
b189318124 protocols: support xdg-dialog modal toplevels
Advertise xdg_wm_dialog_v1 and mirror each dialog object onto its
window. A modal dialog demands attention: on map (or when set modal
while mapped) its tab is shown and it takes window focus, in both
--tab-groups modes; placement itself is unchanged and session lock
still wins.

wltest gains --dialog-modal/--extra-modal/--extra-delay; smoke tests
cover the global, the background-modal steal with tab-groups on, and
the own-tab steal with tab-groups off.
2026-09-04 10:00:34 +10:00
42853dcc18 protocols: honor wlr-gamma-control for night-light tools
Advertise zwlr_gamma_control_manager_v1 and commit client ramps to
the single output (reset when the control goes away); other outputs
and failed commits fail the control so clients retry. Outputs with
no LUT (headless/nested) are failed by wlroots itself.

wltest gains a --gamma mode reporting gamma_size/failed; smoke tests
cover the global and the clean headless failure path.
2026-09-04 09:43:04 +10:00