qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ui/cocoa.m: fix sending mouse event to guest


From: Programmingkid
Subject: [Qemu-devel] [PATCH] ui/cocoa.m: fix sending mouse event to guest
Date: Sat, 2 Apr 2016 12:56:02 -0400

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 <address@hidden>
---
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]