[PATCH 6/6] Xwayland DDX

Kristian Høgsberg hoegsberg at gmail.com
Tue Apr 1 09:32:09 PDT 2014


On Tue, Apr 01, 2014 at 12:10:09AM -0700, Keith Packard wrote:
> Kristian Høgsberg <krh at bitplanet.net> writes:
> 
> > +static WindowPtr
> > +xwl_xy_to_window(DeviceIntPtr master, SpritePtr sprite, int x, int y)
> 
> With my previous adjustment to leave the existing public XYToWindow API
> unchanged, xwl_xy_to_window will need to figure out which pointer device
> the sprite is associated with. Here's a patch which should "obviously"
> be correct; it should be easy to reduce this to a single pass over the
> input devices though.

Indeed, I'll send out a v2 of the Wayland DDX patch.

Kristian

> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index 452789f..99ae5bd 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -599,10 +599,15 @@ DDXRingBell(int volume, int pitch, int duration)
>  }
>  
>  static WindowPtr
> -xwl_xy_to_window(DeviceIntPtr master, SpritePtr sprite, int x, int y)
> +xwl_xy_to_window(ScreenPtr screen, SpritePtr sprite, int x, int y)
>  {
>      struct xwl_seat *xwl_seat = NULL;
>      DeviceIntPtr device;
> +    DeviceIntPtr master;
> +
> +    for (master = inputInfo.devices; master; master = master->next)
> +        if (master->spriteInfo && master->spriteInfo->sprite == sprite)
> +            break;
>  
>      for (device = inputInfo.devices; device; device = device->next)
>          if (GetMaster(device, MASTER_ATTACHED) == master) {
> 
> -- 
> keith.packard at intel.com




More information about the xorg-devel mailing list