Advertisement
Doomlaser

void GlobalHideCursor(void)

Nov 13th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. void CGSSetConnectionProperty(int, int, CFStringRef, CFBooleanRef);
  2. int _CGSDefaultConnection();
  3. CFStringRef propertyString;
  4.    
  5. // Hack to make background cursor setting work
  6. propertyString = CFStringCreateWithCString(NULL, "SetsCursorInBackground", kCFStringEncodingUTF8);
  7. CGSSetConnectionProperty(_CGSDefaultConnection(), _CGSDefaultConnection(), propertyString, kCFBooleanTrue);
  8. CFRelease(propertyString);
  9.  
  10. // Hide the cursor and wait
  11. CGDisplayHideCursor(kCGDirectMainDisplay);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement