summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salframe.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 61dd536b2f47..202c2eefe1cb 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -802,6 +802,18 @@ void AquaSalFrame::ToTop(sal_uInt16 nFlags)
NSCursor* AquaSalFrame::getCurrentCursor() const
{
+ /* Create invisible cursor */
+ static NSCursor *invisibleCursor = NULL;
+ if (!invisibleCursor) {
+ NSImage *cursorImage = [[[NSImage alloc] initWithSize:NSMakeSize (16, 16)] autorelease];
+ [cursorImage lockFocus];
+ [[NSColor clearColor] set];
+ NSRectFill( NSMakeRect( 0, 0, 16, 16 ) );
+ [cursorImage unlockFocus];
+ invisibleCursor = [[NSCursor alloc] initWithImage:cursorImage
+ hotSpot:NSZeroPoint];
+ }
+
NSCursor* pCursor = nil;
switch( mePointerStyle )
{
@@ -825,7 +837,7 @@ NSCursor* AquaSalFrame::getCurrentCursor() const
case POINTER_WINDOW_WSIZE:
pCursor = [NSCursor resizeLeftRightCursor]; break;
case POINTER_REFHAND: pCursor = [NSCursor pointingHandCursor]; break;
- case POINTER_NULL: [NSCursor hide]; break;
+ case POINTER_NULL: pCursor = invisibleCursor; break;
default:
pCursor = GetSalData()->getCursor( mePointerStyle );