You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Listen for surface commit rather than surface map in sway/lock.c for focus / cursor rebasing.
Move the surface_reconfigure call from wlroots/types/scene/surface.c:204 to a surface map callback.
The change in lock.c is tiny and seems completely harmless; I'm happy to make it a PR if appropriate.
The text was updated successfully, but these errors were encountered:
Luminiscental
changed the title
Session lock surface receives no pointer enter until motion
Swaylock receives no pointer enter until cursor motion
Sep 11, 2024
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.
The text was updated successfully, but these errors were encountered: