Fwd: Constraining cursor to RandR crtcs

David Sharp whereami at gmail.com
Mon Apr 2 18:09:39 PDT 2007


[sorry Nicolas...]

---------- Forwarded message ----------
From: David Sharp <whereami at gmail.com>
Date: Apr 2, 2007 4:10 PM
Subject: Re: Constraining cursor to RandR crtcs
To: Nicolas Mailhot <nicolas.mailhot at laposte.net>


On 4/2/07, Nicolas Mailhot <nicolas.mailhot at laposte.net> wrote:
> Le lundi 02 avril 2007 à 22:59 +0100, Colin Guthrie a écrit :
>
> > I'm probably guessing/assuming wildly here, but how often is it that
> > there are gaps (or that there /needs/ to be gaps) in the display areas?
>
> This will probably be pretty common in setups where you cobble together
> screen walls from existing materials with slightly different physical
> sizes and non-zero plastic borders. You'll need the dead zones for the
> image to properly align from one screen to another.

I think it would be easy to detect such dead zones:

 +---------------------------------+----+---------------------------------+
 |                                 |xxxx|                                 |
 |                                 |xxxx|                                 |
 |                                 |xxxx|                                 |
 |                                 | 5  |                                 |
 |                              3  |xxxx| 4                               |
 +---------------------------------+----+                                 |
                                        |                                 |
                                        |                                 |
                                2       | 1                               |
                                        +---------------------------------+

I would expect the mouse to be allowed in region 5, but not region 2.
I think it would be simple enough to detect if there is a CRTC to the
((left && right) || (above && below)) of the cursor position, and
allow the cursor to be in these areas, but this criterion would get
more complex as more CRTCs are added.

for example, situations like this would be ugly:

xxxxxxx
x_____x

(where each 'x' is a crtc)

What do you do in the large blank region? It would be easy to get lost
in that area, and it would probably be better not to allow the cursor
there.

Another thought comes to me: parallel the design of Input-only and
input-output windows, and have the ability to define input-only "CRTC"
regions in addition to the normal input-output CRTCs. The (L&R|A&B)
criterion above could be used to generate a "usually sane" default.
so, region 5 would become an input-only "CRTC" region.

my $0.02,
d#
(just a lurker)



More information about the xorg mailing list