aboutsummaryrefslogtreecommitdiff
path: root/ui/cocoa.m
diff options
context:
space:
mode:
Diffstat (limited to 'ui/cocoa.m')
-rw-r--r--ui/cocoa.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 73cfafa..c298402 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -902,7 +902,12 @@ QemuCocoaView *cocoaView;
case NSEventTypeLeftMouseUp:
mouse_event = true;
if (!isMouseGrabbed && [self screenContainsPoint:p]) {
- if([[self window] isKeyWindow]) {
+ /*
+ * In fullscreen mode, the window of cocoaView may not be the
+ * key window, therefore the position relative to the virtual
+ * screen alone will be sufficient.
+ */
+ if(isFullscreen || [[self window] isKeyWindow]) {
[self grabMouse];
}
}