From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QalNS-00046V-60 for qemu-devel@nongnu.org; Sun, 26 Jun 2011 05:11:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QalNQ-0004Kd-QA for qemu-devel@nongnu.org; Sun, 26 Jun 2011 05:11:38 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:56769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QalNQ-0004KQ-CZ for qemu-devel@nongnu.org; Sun, 26 Jun 2011 05:11:36 -0400 Message-ID: <4E06F7C1.30507@web.de> Date: Sun, 26 Jun 2011 11:11:29 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E049EB7.4010309@siemens.com> <0A671AC2-4669-462A-A704-12D94A3D5ACB@web.de> <4E05DAAC.7040905@web.de> <9B636835-1A44-4B01-A92D-7CECD3039669@web.de> In-Reply-To: <9B636835-1A44-4B01-A92D-7CECD3039669@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2AEAE530E37F91DE0E384F4A" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] usb-hid: Fix 0/0 position for Windows in tablet mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: qemu-devel , Gerd Hoffmann This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2AEAE530E37F91DE0E384F4A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-06-25 15:10, Andreas F=E4rber wrote: > Am 25.06.2011 um 14:55 schrieb Jan Kiszka: >=20 >> On 2011-06-25 14:37, Andreas F=E4rber wrote: >>> Am 24.06.2011 um 16:27 schrieb Jan Kiszka: >>> >>>> For unknown reasons, Windows drivers (tested with XP and Win7) ignor= e >>>> usb-tablet events that move the pointer to 0/0. So always set bit 0 = of >>>> the coordinates. >>>> >>>> Signed-off-by: Jan Kiszka >>>> --- >>>> hw/usb-hid.c | 6 ++++-- >>>> 1 files changed, 4 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/hw/usb-hid.c b/hw/usb-hid.c >>>> index d711b5c..2b9a451 100644 >>>> --- a/hw/usb-hid.c >>>> +++ b/hw/usb-hid.c >>>> @@ -457,8 +457,10 @@ static void >>>> usb_pointer_event_combine(USBPointerEvent *e, int xyrel, >>>> e->xdx +=3D x1; >>>> e->ydy +=3D y1; >>>> } else { >>>> - e->xdx =3D x1; >>>> - e->ydy =3D y1; >>>> + /* Windows drivers do not like the 0/0 position and ignore >>>> such >>>> + * events. */ >>>> + e->xdx =3D x1 | 1; >>>> + e->ydy =3D y1 | 1; >>> >>> Doesn't this change mean we can't access any other even pixel either?= >> >> Only on 32767x32767 screens (that's the resolution of the tablet). >=20 > Well, if it's just a fix for 0/0 I would've expected something like: >=20 > e->xdx =3D x1 ? x1 : 1; > e->ydy =3D y1 ? y1 : 1; Works as well, my version is a little bit simpler. But I don't mind, will post whatever is preferred to fix this. Jan --------------enig2AEAE530E37F91DE0E384F4A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk4G98QACgkQitSsb3rl5xQD7wCfXVluAMb43IiLoEXF3Tx7BM8V ecsAoMl/3GYBYytbORrXn2Tv0HE9x6Hi =o6ql -----END PGP SIGNATURE----- --------------enig2AEAE530E37F91DE0E384F4A--