Re: Option-click on my app hides the other app
Re: Option-click on my app hides the other app
- Subject: Re: Option-click on my app hides the other app
- From: Eric Schlegel <email@hidden>
- Date: Wed, 10 Aug 2005 21:20:59 -0700
On Aug 10, 2005, at 5:11 PM, Ben Haller wrote:
The problem: Unfortunately, I want to use option-clicks in my
app, and I want to take clicks even when I'm not active (my window
is floating and usable even when my app is not the active app). So
this behavior gets in the way; the user just wants to option-click
in my window, and the option-click hides the active app, which was
not their intention.
Any way to turn off this facility? I am happy with a workaround
that works only on 10.4, as my app will be 10.4-only anyway...
It doesn't appear that there's any way solely using AppKit to disable
this, but there is still a possibility: when you create a Carbon
window of class kUtilityWindowClass (windows of this type are
globally floating windows that are meant to be usable when the app is
not active), Carbon will automatically disable the option-click-hides-
the-active-app behavior. Therefore, you might try this:
- create your window using the Carbon API CreateNewWindow. Specify
kUtilityWindowClass as the window class.
- wrap the WindowRef into an NSWindow using [NSWindow
initWithWindowRef:theUtilityWindowRef]
- create your Cocoa-based window content using the NSWindow wrapper
I don't know for sure whether this will work, but it might be worth a
try. And whether it works or not, you should probably file a bug
against NSWindow requesting a way to get this behavior directly with
AppKit API.
-eric
_______________________________________________
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