Open Luminiscental opened 2 months ago
Moving surface_reconfigure wouldn't work because the client can do all sorts of things when committing a new surface: resize it, change its transform, scale, etc. Which means we're left with option 1. Please open a PR for that.
This happens because at the time of the cursor_rebase_all call, while the wlr_surface for the lock surface has its client buffer initialized correctly, the wlr_scene_surface's scene buffer is null, so when sway/input/cursor.c traverses the scene tree it doesn't hit the lock surface.
The cursor rebase happens when the lock surface role's commit callback calls wlr_surface_map, triggering sway/lock.c's surface map callback. The scene buffer is initialized immediately after that, from the surface commit signal, by wlroots/types/scene/surface.c:204.
I don't know if this is a bug in sway or wlroots. Two small fixes which work but may be incorrect:
The change in lock.c is tiny and seems completely harmless; I'm happy to make it a PR if appropriate.