Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swaylock receives no pointer enter until cursor motion #8342

Open
Luminiscental opened this issue Sep 11, 2024 · 1 comment · May be fixed by #8343
Open

Swaylock receives no pointer enter until cursor motion #8342

Luminiscental opened this issue Sep 11, 2024 · 1 comment · May be fixed by #8343
Labels
bug Not working as intended

Comments

@Luminiscental
Copy link

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.

@Luminiscental Luminiscental added the bug Not working as intended label Sep 11, 2024
@Luminiscental Luminiscental changed the title Session lock surface receives no pointer enter until motion Swaylock receives no pointer enter until cursor motion Sep 11, 2024
@Nefsen402
Copy link
Member

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.

Luminiscental added a commit to Luminiscental/sway that referenced this issue Sep 12, 2024
@Luminiscental Luminiscental linked a pull request Sep 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

Successfully merging a pull request may close this issue.

2 participants