Re: Preventing mouse clicks from bringing a window to the front
Re: Preventing mouse clicks from bringing a window to the front
- Subject: Re: Preventing mouse clicks from bringing a window to the front
- From: Tim Hewett <email@hidden>
- Date: Sat, 19 Feb 2005 00:09:21 +0000
Greg,
I **think** you can do this by making one of the windows a
child of the other and then defining how they are to be ordered.
So you could set your "always behind" window to be a child
of the "always front" one and it should then keep that ordering
even when clicked.
HTH,
Tim.
On 18 Feb 2005, at 19:09, email@hidden wrote:
Here is an over simplified description of my problem...
My app has one window open and another window open behind it -- I
would like to prevent the user from bringing the back window up to
the front.
How can I override the action of a user clicking on the back window
to prevent that window from moving to the front.
The closest I can get to this behavior is to send
-setIgnoresMouseEvents to the back window but that simply makes the
window transparent and will act as if the click was on whatever was
behind this window -- in most cases the Finder.
Preventing key and main states do just that and the window will still
move to the front.
I have tried overriding sendEvent in subclasses of NSWindow,
NSWindowController, NSApplication and NSView with no success. The
window seems to get moved to the front before any of these objects
receive the sendEvent or mouseDown messages.
shouldDelayWindowOrderingForEvent gives mixed results and has no
effect if the click is on the title bar.
I really prefer not to use sheets and in some cases sheets just are
not an option.
Does anyone out there have a clue on this one?
Thanks.
Gregg
_______________________________________________
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