All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ui/cocoa.m: fix sending mouse event to guest
@ 2016-04-02 16:56 Programmingkid
  2016-04-02 17:07 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2016-04-02 16:56 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel qemu-devel

The mouse down event should not be sent to the guest if the mouse down event
causes an activation of QEMU. This patch prevents activation clicks from going
to the guest.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
 ui/cocoa.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 60a7c07..07d9c86 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -698,7 +698,7 @@ QemuCocoaView *cocoaView;
          * call below. We definitely don't want to pass that click through
          * to the guest.
          */
-        if ((isMouseGrabbed || [[self window] isKeyWindow]) &&
+        if ((isMouseGrabbed && [[self window] isKeyWindow]) &&
             (last_buttons != buttons)) {
             static uint32_t bmap[INPUT_BUTTON__MAX] = {
                 [INPUT_BUTTON_LEFT]       = MOUSE_EVENT_LBUTTON,
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-03 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-02 16:56 [Qemu-devel] [PATCH] ui/cocoa.m: fix sending mouse event to guest Programmingkid
2016-04-02 17:07 ` Peter Maydell
2016-04-02 17:25   ` Programmingkid
2016-04-02 17:35     ` Peter Maydell
2016-04-02 17:53       ` Programmingkid
2016-04-03 12:21         ` Peter Maydell
2016-04-03 16:05           ` Programmingkid

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.