From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43883 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd3Xl-0004C0-DW for qemu-devel@nongnu.org; Wed, 12 Jan 2011 11:27:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd3Xj-0007qs-KC for qemu-devel@nongnu.org; Wed, 12 Jan 2011 11:27:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd3Xj-0007qN-9o for qemu-devel@nongnu.org; Wed, 12 Jan 2011 11:27:27 -0500 Message-ID: <4D2DD664.6090109@redhat.com> Date: Wed, 12 Jan 2011 17:27:16 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1294834760-24996-1-git-send-email-pbonzini@redhat.com> <19757.40902.900137.923740@mariner.uk.xensource.com> <4D2DA63E.2030506@redhat.com> In-Reply-To: <4D2DA63E.2030506@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2] add event queueing to USB HID List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Ian Jackson , "qemu-devel@nongnu.org" , Stefano Stabellini Hi, >>> I left the "changed" member in USBHIDState, rather than moving it >>> to the keyboard, because it is useful to handle the idle period >>> (in USB_TOKEN_IN) in a device-independent way. Without it the >>> code became more messy. >> >> This leaves the same information recorded in the driver in two places >> and is therefore IMO a bad idea. I still think the way I did this is >> best: have a common helper function used by the keyboard and pointer >> code to deal with the idle handling. > > I don't disagree, but I think this is better left for a separate patch. Just use a queue for both pointer and keyboard -- problem solved ;) Need a test case? Connect with vncviewer, press F8, pick "Send Ctrl-Alt-Del" from the menu. Works with ps/2 keyboard. Doesn't work with usb keyboard. cheers, Gerd