On Fri, Oct 02, 2009 at 11:36:34PM +0200, Julien Cristau wrote:
> On Fri, Oct  2, 2009 at 13:42:48 -0700, Jamey Sharp wrote:
> > @@ -307,7 +307,7 @@ xf86RandRSetConfig (ScreenPtr           pScreen,
> >      /*
> >       * Move the cursor back where it belongs; SwitchMode repositions it
> >       */
> > -    if (pScreen == miPointerCurrentScreen ())
> > +    if (pScreen == miPointerGetScreen (inputInfo.pointer))
> >      {
> >     px = (px >= pScreen->width ? (pScreen->width - 1) : px);
> >     py = (py >= pScreen->height ? (pScreen->height - 1) : py);
> 
> Should this loop over the master pointers instead?

I get the impression from glancing at the code that you're right, but
xf86RandRSetConfig begins with

        miPointerGetPosition(inputInfo.pointer, &px, &py);

and this if block ends with

        (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, ...

so there's quite a bit more involved in such a change.

Meanwhile, this simple patch at least makes this call consistent with
the two near it, and fixes the compiler warning.

I suspect most of this code could go away anyway, in a world where
people rarely use viewport panning. I'd guess the real problem is that
xf86SwitchMode goes to a bunch of trouble to move all the pointers
around and then this function feebly attempts to put one of them back.

Jamey

Attachment: signature.asc
Description: Digital signature

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to