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
Gerrit Reviews
For Gerrit Dashboard: QTBUG-50168 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
144714,2 | Allow to clip mouse cursor to a native window's area | dev | qt/qtbase | Status: DEFERRED | 0 | 0 |
144788,1 | Utility class that automatically clips the mouse cursor to a window. | dev | qt/qtbase | Status: DEFERRED | -1 | 0 |