[PATCH] Replace miPointerCurrentScreen with miPointerGetScreen.

Peter Hutterer peter.hutterer at who-t.net
Sun Oct 4 23:09:55 PDT 2009


On Fri, Oct 02, 2009 at 02:54:57PM -0700, Jamey Sharp wrote:
> 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.

a number of inputInfo.pointer usages should be fixed to cope with multiple
pointers properly. this second one dates back to Nov 2006 which were the
really early days of MPX. I'll go with daniel here and say please leave the
warning there so there's some incentive to look at it*.

I still need to go through and figure out the best thing to do in all cases,
it's not always clear-cut.
 
Cheers,
  Peter

* it's on my todo list now, feel free to file a bug though to ensure it
doesn't disappear.



More information about the xorg-devel mailing list