qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] Cocoa display driver cursor visibility


From: Riihimaki Juha (Nokia-D-MSW/Helsinki)
Subject: [Qemu-devel] [PATCH] Cocoa display driver cursor visibility
Date: Fri, 19 Dec 2008 13:50:13 +0200

Let Cocoa CG display driver show host cursor if invoked with "-show- cursor" option.

Index: cocoa.m
===================================================================
--- cocoa.m     (revision 6098)
+++ cocoa.m     (working copy)
@@ -583,12 +583,12 @@
             if (isAbsoluteEnabled) {
if (p.x < 0 || p.x > screen.width || p.y < 0 || p.y > screen.height || ![[self window] isKeyWindow]) { if (isTabletEnabled) { // if we leave the window, deactivate the tablet
-                        [NSCursor unhide];
+                        if (cursor_hide) [NSCursor unhide];
                         isTabletEnabled = FALSE;
                     }
                 } else {
if (!isTabletEnabled) { // if we enter the window, activate the tablet
-                        [NSCursor hide];
+                        if (cursor_hide) [NSCursor hide];
                         isTabletEnabled = TRUE;
                     }
                 }
@@ -668,7 +668,7 @@
         else
[normalWindow setTitle:@"QEMU - (Press ctrl + alt to release Mouse)"];
     }
-    [NSCursor hide];
+    if (cursor_hide) [NSCursor hide];
     CGAssociateMouseAndMouseCursorPosition(FALSE);
isMouseGrabed = TRUE; // while isMouseGrabed = TRUE, QemuCocoaApp sends all events to [cocoaView handleEvent:]
 }
@@ -683,7 +683,7 @@
         else
             [normalWindow setTitle:@"QEMU"];
     }
-    [NSCursor unhide];
+    if (cursor_hide) [NSCursor unhide];
     CGAssociateMouseAndMouseCursorPosition(TRUE);
     isMouseGrabed = FALSE;
 }





reply via email to

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