• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exit screen saver programmatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit screen saver programmatically?


  • Subject: Re: Exit screen saver programmatically?
  • From: Gabriel Zachmann <email@hidden>
  • Date: Thu, 24 Sep 2009 19:09:30 +0200

In that case, then you should pass the unwanted event to the superclass, which will handle the event in that case.

Ah, you mean like this, I suppose?

		[super keyDown: theEvent];

That seems to work like a charm. Thanks a million!

(For the record, I thought that user code is not supposed to call keyDown and the likes,
that's why I tried this:


CGEventRef ourEvent = CGEventCreate(NULL);
CGPoint point = CGEventGetLocation(ourEvent); // get current mouse location
point.x += 1.0;
ourEvent = CGEventCreateMouseEvent( NULL, kCGEventMouseMoved, point, kCGMouseButtonCenter );
CGEventSetType(ourEvent, kCGEventMouseMoved);
CGEventPost( kCGSessionEventTap, ourEvent ); // post mouse moved event
CFRelease( ourEvent );


But that sometimes worked, sometimes not.)


Best regards, Gabriel.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Exit screen saver programmatically? (From: Gabriel Zachmann <email@hidden>)
 >Re: Exit screen saver programmatically? (From: Gabriel Zachmann <email@hidden>)
 >Re: Exit screen saver programmatically? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: NSConnection ignores setRequestTimeout: on first request
  • Next by Date: Re: Drawing text chunks (e.g. paras) in a text view with alternating background colours
  • Previous by thread: Re: Exit screen saver programmatically?
  • Next by thread: Re: Exit screen saver programmatically?
  • Index(es):
    • Date
    • Thread