diff options
author | Matthew Francis <mjay.francis@gmail.com> | 2015-04-12 23:10:58 +0800 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-04-15 03:21:00 +0000 |
commit | 58a3a99efec9d4bcb4ab61c41bf2feb707c8e1ef (patch) | |
tree | c3bc67977946f6dd995106dd2b6d55ceed8aaf2f /vcl | |
parent | a4757e800be39ca528d3b7d3f39b09d10c39978e (diff) |
tdf#71278 Set an invisible cursor rather than hiding the cursor
Change-Id: I5ecfa01ab444148aa8d13d04f78db1c6c131a4df
Reviewed-on: https://gerrit.libreoffice.org/15269
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/salframe.cxx | 14 |
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 ); |