Kristian Høgsberg <[email protected]> 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.
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) {
--
[email protected]
pgppMkCOSBcvZ.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
