[7u4-osx] Request for approval for 7124554: [macosx] JWindow does ignore setAlwaysOnTop property (original) (raw)

Anthony Petrov anthony.petrov at oracle.com
Fri Jan 13 10:08:29 PST 2012


[ BCC'ing jdk7u-dev at . I'll resend the request once we settle down all technical issues. ]

Hi Mike,

I'm sorry but I don't see this claim valid. Please let me explain:

  1. AWT puts always-on-top windows on the NSFloatingWindowLevel level. This is done in AWTWindow.m. Please note that: a) this fix does not alter this file in any way. I.e. I'm not changing the way this feature is already implemented. b) the NSFloatingWindowLevel isn't above anything but the NSNormalWindowLevel only (on which all non-always-on-top Java windows reside). In other words, the floating level is well below the dock, menus, and everything else you've listed. Please see [1] for details.

  2. This fix deals with a particular case when an owned window is made an always-on-top window. The -addChildWindow: would reset the level of such a window back to normal, and with this fix we just set it back to the original value (floating) since the window should be always-on-top according to Java specification. Note that the fix doesn't changes the level to any arbitrary value, but simply restores it to what it already was set just before the -addChildWindow: call. Please see my original review request message at [2] which explains this in more details.

Please clarify whether you still have an issue with this particular fix. I would appreciate to see more specific details on what exactly (line numbers/code snippets of the parts that are modified) is wrong with the fix at [3].

[1] http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Window_Levels

[2] http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-January/002139.html

[3] http://cr.openjdk.java.net/~anthony/x-6-alwaysOnTop.0/

-- best regards, Anthony

On 1/13/2012 9:27 PM, Mike Swingler wrote:

On Jan 13, 2012, at 5:23 AM, Anthony Petrov wrote:

[ resending and CC'ing macosx-port-dev@ this time ]

This is a request to push the following fix to jdk7u-osx: CR: http://bugs.sun.com/bugdatabase/viewbug.do?bugid=7124554 Webrev: http://cr.openjdk.java.net/~anthony/x-6-alwaysOnTop.0/ Technical review: http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-January/002139.html I don't agree that this fix should be integrated. You are allowing ordinary windows to go way above the popup, menu bar, modal window, and even the dock...you should simply use the NSNormalWIndowLevel and add single integral values to it. Otherwise you Java windows are going to be floating on top over everything else on the desktop. The named constants are only for when you need to make some windows float just above or just below one of those named levels. Please do not integrate this fix as is, Mike Swingler Apple Inc.



More information about the macosx-port-dev mailing list