Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nomar383

macrumors 65816
Original poster
Jan 29, 2008
1,310
0
Rexburg, ID
I have been using a preference pane called "Cursorcerer" in the project that I am working on, but it needs a bit of an update. I assume that is was built using a much older SDK since the code he references will not even build in the latest xcode. Any ideas on updating this code to get it working? I basically need to rebuild this preferencepane and include a 64 bit version. Here is the base code behind it:

Code:
#if EXPLOITBACKGROUNDCURSORHACK
long sysVers = GetSystemVersion();
            
    // This trick doesn't work on 10.1 
if (sysVers >= 0x1020)
{
void CGSSetConnectionProperty(int, int, int, int);
int CGSCreateCString(char *);
int CGSCreateBoolean(BOOL);
int _CGSDefaultConnection();
void CGSReleaseObj(int);
int propertyString, boolVal;
// Hack to make background cursor setting work
propertyString = CGSCreateCString("SetsCursorInBackground");
boolVal = CGSCreateBoolean(TRUE);
CGSSetConnectionProperty(_CGSDefaultConnection(), _CGSDefaultConnection(), propertyString, boolVal);
CGSReleaseObj(propertyString);
CGSReleaseObj(boolVal);
}
#endif

It references undocumented APIs, but it still works even in snow leopard. Any help would be greatly appreciated.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.