Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • W weston
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 362
    • Issues 362
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 124
    • Merge requests 124
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • waylandwayland
  • weston
  • Issues
  • #665
Closed
Open
Issue created Sep 19, 2022 by manuel alfayate@vanfanelContributor

[NOT AN ISSUE] SDL_SetWindowMouseRect() doesn't confine the cursor on Weston until confinement area is clicked

Hello,

The commonly used SDL_SetWindowMouseRect() SDL2 function doesn't confine the cursor on the Weston compositor.

This fun

Now, SDL_SetWindowMouseRect() uses Wayland_input_confine_pointer(). The code to this particular function is here:

https://github.com/libsdl-org/SDL/blob/3b20e0ecef9623cac2fba60b9113be1d9ef5f255/src/video/wayland/SDL_waylandevents.c#L2596

I have been trying to debug it. The values passed to wl_region_add() are correct, so it seems that either zwp_pointer_constraints_v1_confine_pointer() or zwp_confined_pointer_v1_add_listener().

Sometimes, however, in Scummvm things seem to work and cursor is indeed confined in fullscreen mode + aspect ratio correction.

Things work perfectly well on Sway, but in tinywl cursor isn't confined either. Not easy to debug because setting breakpoints in zwp_pointer_constraints_v1_confine_pointer() or zwp_confined_pointer_v1_add_listener() are both done via wl_proxy_marshal_flags().

Any idea on what could be happening here?

Edited Sep 19, 2022 by manuel alfayate
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking