[PATCH 6/6] Xwayland DDX
Keith Packard
keithp at keithp.com
Tue Apr 1 00:10:09 PDT 2014
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.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140401/2119f5c1/attachment.sig>
More information about the xorg-devel
mailing list