[PATCH v2 7/7] dix: NewCurrentScreen must work on pointers where possible

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 20 20:30:17 PDT 2011


sorry, travelling, late answer.

On Thu, Sep 15, 2011 at 06:46:09PM -0700, Keith Packard wrote:
> On Fri, 2 Sep 2011 11:36:51 +1000, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 
> >  void
> >  NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
> >  {
> > -    SpritePtr pSprite = pDev->spriteInfo->sprite;
> > +    DeviceIntPtr ptr;
> > +    SpritePtr pSprite;
> > +
> > +    ptr = IsFloating(pDev) ? pDev : GetXTestDevice(GetMaster(pDev, MASTER_POINTER));
> 
> This assumes that any floating device passed to NewCurrentScreen is a
> pointer device, right? 

yes, but if the device is floating and a kbd device only, we can't generate
motion events for it anyway - we don't have a pointer to generate them on.

Cheers,
  Peter


More information about the xorg-devel mailing list