 |
 |
Arrgh! How do I hide the cursor??
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Hi.
I want to hide the cursor.
Any particular reason this doesn't work? I haven't been able to find a lot of documentation, but several places mention HideCursor():
Code:
#include <stdio.h>
#include <Carbon/Carbon.h>
int main()
{
InitCursor();
HideCursor();
sleep(10);
ShowCursor();
return 0;
}
The cursor stays right where it is when I run this.
Anyone have help?
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I don't know if that's an exact example of what you're trying to do, but HideCursor() only applies to the calling application, so that code shouldn't do anything.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Oh. Drat. Thanks.
Do you know of any way to hide the cursor globally?
I'm adding code to the VNC server that dims the screen when you connect, so you can use your Mac remotely without anyone walking by seeing what you're up to.
I do this by adjusting all the gammas to zero, and that works great -- the screen turns black locally, but over VNC you can still see everything normal.
One little glitch is that the cursor still shows up, so someone walking by your Mac would see a little cursor flitting around a black screen.
It's not a big deal, but I'd like to turn the cursor invisible as well.
Thanks for the feedback.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
Have you looked at CGAssociateMouseAndMouseCursorPosition in CGRemoteOperation.h? It looks like a good candidate.
Is this for OSXVnc?
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Ah, thanks, I figured it out.
Forgot I could just change the call to CGPostMouseEvent() to not update the local cursor position. That'll fix it.
Yes, it's for OSXvnc. I had made these changes, and a few others, to a 0.7 version a year or two, but never bothered to send them 'upstream' to a package maintainer.
But now I figured I should sync them up to the Redstone Software folks, since they're being nice enough to maintain it.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by Mithras:
One little glitch is that the cursor still shows up, so someone walking by your Mac would see a little cursor flitting around a black screen.
Actually that sounds pretty neat - I wouldn't mind - my wife would probably think the computer was possessed! She already gets freaked when she walks by and sees me using her machine remotely.
BTW, will the local user be able to override this? I would hate for some unauthorized person to find a way to connect to my machine and there be no way to stop him from the console.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|