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

Clip mouse cursor position

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P5: Not important
    • None
    • 5.5.1, 5.6.0
    • None
    • Debian stretch 4.2 kernel, Qt 5.6 head from the repository

    Description

      Hello,
      It'd be nice to have the ability to clip the mouse cursor to a certain area of the screen or window. I've needed this recently and I wasn't able to achieve it with the standard set of tools Qt provides. The problem really is that when one gets to the messages in Qt they're already processed by the window manager and there is no "good" way to reposition the mouse pointer without it jittering near the edges of the rectangle/window the pointer is supposed to be clipped to.Putting a virtual bool restrictMouse(bool grab) function in QPlatformWindow, should be enough to enable that functionality. And I'm attaching in the text file a very simple implementation for X11.

      Kind regards.

      Attachments

        For Gerrit Dashboard: QTBUG-50168
        # Subject Branch Project Status CR V

        Activity

          People

            sletta Gunnar Sletta
            kshegunov Konstantin Shegunov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes