Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

preventWindowOrdering not working



I have a unique situation that I can't seem to work around. I have a
framework that displays a (custom) modal dialog. Because of limitations
in WebKit and some funny nuances in my modal window(s), I've been forced
roll my own modal filter using NSApp's
-nextEventMatchingMask:untilDate:inMode:dequeue:. In my filter, I stop
any events from going to windows that are not my windows (i.e. not my
framework's windows). Unfortunately, even though I filter out all
mousedown and mouseup events from going to other windows, the foreign
window is still brought to the front. 

While outputting all events, I see the mousedown event get ignored, then
I see the mouseup event get ignored, and then the window is brought to
front without any other events being fired. I looked into using NSApp's
-preventWindowOrdering, and calling this before/after sending or
ignoring the event, and nothing seems to work. I can't override
mousedown: because the windows that I want to prevent from ordering
aren't owned by me (they're from the app calling my framework). I also
want to disable the app's menu bar. 

Does anyone have any recommendations on how I might get this to work?
Or, even better, does anyone have an example modal filter that they've
implemented successfully?

Thanks in advance.

Josh Ferguson
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.