Re: determine if Dashboard is active...
Re: determine if Dashboard is active...
- Subject: Re: determine if Dashboard is active...
- From: Shaun Wexler <email@hidden>
- Date: Fri, 15 Sep 2006 07:50:02 -0700
On Sep 15, 2006, at 6:50 AM, Clayton John wrote:
Just wondering if anyone has any tips about this? Don't be afraid
to yell out! :-)
John Clayton
On 14 Sep 2006, at 20:41, Clayton John wrote:
Hello All,
As one part of an application - I would like to determine whether
or not Dashboard is currently active. I will be doing this within
the context of an event handler that has received a mouse-down/
click event. My application must avoid performing it's logic when
the Dashboard is active - and the logic is kicked off via mouse-
movement / clicks.
Since Dashboard does not represent itself as a process, I can't
simply try to find that process - and the accessibility inspector
shows no information whatsoever when the mouse does not hover over
a widget. I had originally thought I could simply use one of the
AXUIxxxx() calls to determine the AXUIElement heirarchy for the
element under the mouse - but since the AI inspector does
absolutely nothing when the Dashboard is active I've so far
assumed that the Dashboard is a special case and can't be
inspected. I should really get off my lazy ass and try that in my
code however.
Anyone else got some tips that'll help me determine if Dashboard
is active?
Subclass NSApplication and override -[NSApplication sendEvent:] to
catch event type 21 (ProcessNotification). From there you'll have to
figure out how to interpret the context, subtype, data1, data2.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden