Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116493

Locked/Constrained pointers

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • QPA
    • None
    • Linux/Wayland

    Description

      On Wayland the compositor is in sole control of user input and a client can't influence the cursor positions at all. There are still use cases where the cursor should not be able to escape a particular region or not move at all.

      For this exists the pointer constraints protocol. It covers confined and locked cursors

      Locked pointer:

      • activates once pointer is inside a specified region of the window (can be the whole window)
      • once activated the actual system cursor does not move at all (also wl_pointer.motion events are send)
      • however the application can get information of the movement of the physical mouse by using the relative pointer protocol and draw a custom cursor if needed
      • potential use cases: Games, remote control

      Confined pointer:

      • activates once pointer is inside a specified region of the window (can be the whole window)
      • once activated the cursor cant escape the region
      • use cases: VM, remote session, remote control

      Wayland objects needed here are: wl_pointer which is availabel in QNativeInterface::QWaylandApplication and wl_surface in QNativeInterface::Private::QWaylandWindow

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              davidedmundson David Edmundson
              davidre David Redondo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes