What's odd is that kreeger's example dialogue ("Restore Session") is the same one that often/typically opens behind other applications and other apps' windows post-Crash Reporter. (I thought I had that filed, but I guess not; I can only find the one about the Crash Reporter itself opening in the bg).
This is a byproduct of how the patch for bug 395465 emulates modal windows (as opposed to sheets) -- the modal window is given a high "window level" for as long as it's displayed (for as long as it's modal). For another example see attachment 278445 [details] (referred to in bug 395465 comment #0). The only way to fix this is to explicitly change every modal window's "level" when Firefox loses app-focus (and restore them when it regains app-focus). I suspect this will be tricky ... but we probably need to do it.
Priority: -- → P2
> The only way to fix this is to explicitly change every modal window's > "level" when Firefox loses app-focus (and restore them when it regains > app-focus). I suspect this will be tricky ... but we probably need to > do it. > Unfortunately - it is not that easy. I have a patch that fixes this - in order to successfully lock down the window ordering, the subviews of the window need to implement a few methods. Just changing the window |level| flag will not fix this in the case that the app loses focus (and is shifted to a |NSNormalWindowLevel|). It is possible to select any window to bring it up front.
Assignee: smichaud → nick.kreeger
Created attachment 322682 [details] [diff] [review] WIP V1 Here is a WIP patch. From my research, the way to disable window reordering is to override two methods (|shouldDelayWindowOrderingForEvent:| and |acceptsFirstMouse:|) and make a call to |[NSApp preventWindowOrdering]| inside the |mouseDown:| call. I found this here: http://www.cocoadev.com/index.pl?PreventWindowOrdering In order to accomplish this, we must traverse down the subviews to make sure they can disable click-through when needed. There are two open issues with this patch: 1.) Background windows are disabled unless you click on the titlebar. Clicking on the titlebar _will_ bring the application into focus. 2.) The Application window menu provided for the dock (context-click on the icon in the doc) needs to be disabled. Window re-ordering will happen if the user picks out a menu item from that popup. I should also note that I'm not happy with my new method names, and those will probably change in the next version of the patch.
Created attachment 322683 [details] [diff] [review] Disable Sheets Hack Patch Here is a patch that helps with testing - it turns off sheets all the time.
Created attachment 322685 [details] HTML Testcase This is a test HTML file that I use for showing JS modal prompts.
Doesn't really meet the "wanted" criteria (security, stability, regression from maintenance release) for 1.9.0.x. However, we'll look at a reviewed and baked patch.
Flags: wanted1.9.0.x? → wanted1.9.0.x-
Duplicate of this bug: 502938
You need to log in before you can comment on or make changes to this bug.