Return to problem list

ID: 4450641

URL: rdar://problem/4450641

Title: ORDERING: Main window is not front after launching other app and closing panel

Originated Date: 19-Feb-2006

State: Open

Fixed? No

Attachments: WindowBug.zip

Description:

Summary: After a panel of an application is closed, such as an About panel or a Preferences panel, it seems that the main/key window does not become the front window of the application. This bug rarely has any discernible effect, because panels don't become the main window, so main window status is never resigned, and as soon as the panel resigns key window status, the main window becomes key window again. And when the panel is closed, there aren't any other windows in front of the main/key window, so it still appears on top. The effects of the window not being front are only demonstrated when a request is sent for another application to do something, such as open a URL, without becoming active. The bug is that the inactive application's window appears in front of the active application's key window. Steps to Reproduce: (1) Build and run the attached WindowBug project. (2) Open and then close WindowBug's About panel, either with the mouse or keyboard. (3) Press return, which calls the action of WindowBug's text field. Do not use the mouse to click on WindowBug's window before pressing return. Expected Results: The apple.com home page should open in the background of the default browser. WindowBug's window should remain in front. Actual Results: The apple.com home page opens in the default browser (I tested with both Safari and Camino), but the browser window appears in front of WindowBug's window. However, WindowBug's main menu is still at the top of the screen, and WindowBug's window is still the key window; you can still type in WindowBug's text field, although you won't see the text until you bring the window to the front. Notes: The bug does not occur if you mouse-click on WindowBug's window before hitting return in the text field. Also, as I comment in the source code for WindowBug, the bug does not occur if the message orderFront: is sent to WindowBug's window before opening the URL. I discovered the bug while working on the open source RSS reader Vienna (http://www.opencommunity.co.uk/vienna2.html). The bug occurs after opening and closing the Preferences panel or the About panel, if the preferences are set to open article in the background of the default browser. I wrote the WindowBug project, which is attached, in order to isolate the problem.

Return to problem list