Received: from eggs.gnu.org ([2001:4830:134:3::10]:56058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1GjQ-0008FA-52 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 11:46:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1GjM-0008Ex-SG for qemu-devel@nongnu.org; Tue, 24 Nov 2015 11:46:16 -0500 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:33034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1GjM-0008Ep-Mu for qemu-devel@nongnu.org; Tue, 24 Nov 2015 11:46:12 -0500 Received: by qgea14 with SMTP id a14so14360725qge.0 for ; Tue, 24 Nov 2015 08:46:12 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Tue, 24 Nov 2015 11:46:09 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <7E1FAF8B-1303-4D09-8E83-A4A02474D90C@gmail.com> References: Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Prevent activation clicks from going to guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel On Nov 24, 2015, at 3:56 AM, Peter Maydell wrote: > On 24 November 2015 at 03:25, Programmingkid = wrote: >>=20 >> On Nov 23, 2015, at 11:06 AM, Peter Maydell wrote: >>=20 >>> On 22 November 2015 at 01:43, Programmingkid = wrote: >>>> When QEMU is brought to the foreground, the click event that = activates QEMU >>>> should not go to the guest. Accidents happen when they do go to the = guest >>>> without giving the user a change to handle them. Buttons are = clicked accidently. >>>> Windows are closed accidently. Volumes are unmounted accidently. = This patch >>>> prevents these accidents from happening. >>>>=20 >>>> Signed-off-by: John Arbuckle >>>=20 >>> So, I checked how Parallels behaves (this is my go-to check for >>> "how should a native OSX VM window behave?"), and it works the >>> same way QEMU does -- left mouse clicks "click through" so they >>> both raise the window to the front and have the behaviour >>> indicated by the guest OS. >>=20 >> But doesn't Parallels allow you to move the mouse pointer before = activating it? >> QEMU requires the mouse to be grabbed before any movement can take >> place. That makes moving the mouse pointer out of danger before an = activation >> click impossible. >=20 > I'm not entirely sure what you mean. Parallels doesn't show a separate > guest mouse pointer generally: where you click the host mouse pointer > is where the click happens. You can choose where in the guest window = you > want to make the activation-and-clickthrough click. >=20 > Ah, I think I've just worked it out -- when there's no guest OS > support for absolute mouse positioning (ie you're using an emulated > mouse rather than emulated tablet for input), the guest mouse pointer > will just be wherever in the guest window it was left (perhaps even > underneath the obscuring window), so we will effectively click on that > point, not on wherever the user actually made the activating click. > OK, I'm convinced, we should definitely not do that. >=20 > I asked somebody to check VMWare's behaviour as another > data point. Apparently it doesn't do click-through > to the guest window, but it doesn't pass through the > right mouse button either. Your patch only affects leftclicks: > should we suppress other mouse events too? Suppressing other mouse events does sound logical. Another patch will be made to do this.=