Constraining cursor to RandR crtcs

Keith Packard keithp at keithp.com
Mon Apr 2 10:14:54 PDT 2007


On Mon, 2007-04-02 at 00:29 -0700, Andy Ritger wrote:

> NVIDIA's TwinView implementation suffers from the same problem --
> that the cursor can be in a region of the screen that is not visible.
> I don't think I've seen many user complaints from that.  I assume users
> just wiggle the mouse around until it finds its way back into a visible
> portion of the screen.

That's what I've been doing as well. It's not ideal, and even the gnome
'find the cursor' thingy doesn't help. Note that the existing DIX-level
Xinerama implementation already imposes precisely the constraints this
code synthesizes.

> For example, how would this interact with cases where the composite
> manager distorts the X screen relative to its CRTC regions?  The
> output-accessible region (what the CRTCs display) may not be the same
> as the desired input-accessible region.

There isn't any interaction here -- a distorting composite manager will
also need to distort the input. The cursor always has a position
relative to the root window, which cannot be distorted by the composite
extension.

> Not necessarily an efficient solution, but the window manager *could*
> watch pointer events and use XWarpPointer to warp the pointer if it
> moved somewhere the window manager didn't want.

Actually, it can't watch events -- it would have to poll the cursor. A
grabbed device only reports motion events to the grab owner. Check out
Xeyes someday. Icky.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20070402/27116463/attachment.pgp>


More information about the xorg mailing list