Three related fixes to make the WM focus lifecycle work end-to-end in the Wayland path: 1. window.c: set wwin->flags.mapped=1 for Wayland windows (the wWindowMap call in wManageWindow is guarded by if(wwin->frame) which is NULL in Wayland, leaving mapped=0 and causing wSetFocusTo to take the no-focus branch immediately). 2. screen.c: call screen_create_internals in the Wayland goto path; this was skipped by goto screen_done but is needed to set auto_focus=1 and clear initial keyboard focus via wlr_seat. 3. wl_backend.c: implement wl_screen_create_internals (sets no_focus_win=WNATIVE_NONE, auto_focus=1, clears seat focus); wl_focus_set now calls wlr_seat_keyboard_clear_focus and logs "focus_clear" when win==WNATIVE_NONE; remove the redundant direct wl_focus_set call from handle_toplevel_map since wManageWindow now handles focus via wSetFocusTo. Smoke test: add check 20 verifying "focus_clear" is logged after the last managed window unmaps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Makefile.am | ||
| test_geom.c | ||
| test_x11_event.c | ||
| wl-smoke-test.sh | ||
| x11-smoke-test.sh | ||