Skip to contentSkip to conversation

Cocoa display driver cursor visibility

PATCH New Riihimaki Juha (Nokia-D-MSW/Helsinki) 1 participant 1 message Dec 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Cocoa display driver cursor visibility

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

cocoa.m +0 -0
Index: cocoa.m
===================================================================
@@ -583,12 +583,12 @@
             if (isAbsoluteEnabled) {
                 if (p.x < 0 || p.x > screen.width || p.y < 0 || p.y  
Quoted 1 line

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;

}