Re: Trouble centering window after mode switch (solved)
Re: Trouble centering window after mode switch (solved)
- Subject: Re: Trouble centering window after mode switch (solved)
- From: Andreas Mayer <email@hidden>
- Date: Wed, 31 Jan 2007 09:44:41 +0100
Am 31.01.2007 um 08:50 Uhr schrieb Matt R:
I've experimented with putting a backdrop window at
shielding level to block out the screen, and then having the
smaller main
windows float ontop of that at shielding level also. Now my problem is
trying to prevent users from bringing the backdrop window to the
front.
Hm. Why not just put the other windows one level higher? i.e.
CGShieldingWindowLevel()+1
I overrode the custom window's MouseDown event and did [NSApp
preventWindowOrdering], but it doesn't seem to work.
I think your content view also needs to return YES for - (BOOL)
shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent
The doku for NSView states:
----------
If this method returns YES, the normal window-ordering and activation
mechanism is delayed (not necessarily prevented) until the next mouse-
up event. If it returns NO, then normal ordering and activation occur.
[...]
If, after delaying window ordering, the receiver actually initiates a
dragging session or similar operation, it should also send a
preventWindowOrdering message to NSApp, which completely prevents the
window from ordering forward and the activation from becoming active.
preventWindowOrdering is sent automatically by the NSView
dragImage:... and dragFile:... methods.
----------
Andreas
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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