Preventing mouse clicks from bringing a window to the front
Preventing mouse clicks from bringing a window to the front
- Subject: Preventing mouse clicks from bringing a window to the front
- From: Gregg Witmer <email@hidden>
- Date: Fri, 18 Feb 2005 11:08:43 -0500
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