From: Markus Armbruster Subject: Re: Re: PVFB wheel events (z-axis) Date: Wed, 27 Feb 2008 17:01:28 +0100 Message-ID: <87prui1j8n.fsf@pike.pond.sub.org> References: <87tzk19xqf.fsf@pike.pond.sub.org> <47C0287F.5070901@novell.com> <87bq656tzb.fsf@pike.pond.sub.org> <47C2FE4D.1030502@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <47C2FE4D.1030502@novell.com> (Pat Campbell's message of "Mon\, 25 Feb 2008 10\:43\:41 -0700") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Pat Campbell Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org All right, I think I understand now how this works. 1. X reports wheel motion as button 4 & 5. 2. VNC viewer duly transmits that into QEMU. 3. QEMU converts it to -1/+1 on z-axis (pointer_event() in vnc.c). 4. Your patch transmits that to the vkbd frontend. Bug: struct xenkbd_position claims abs_z is absolute, which is not true. Question: is that the protocol we want? More below. 5. The vkbd frontend stuffs the z-axis motion into the input layer as REL_WHEEL, with the sign reversed. Bug: it ignores movement other than -1/+1. A case can be made for ignoring 0. Bug: when it acts on z-axis movement, it ignores x/y movement / position. 6. X converts the wheel movement back to button 4 & 5. Weird, isn't it? I'm not sure we want to encode wheel events as z-axis motion in the vkbd frontend/backend protocol. Wouldn't it make more sense to encode it as buttons?