<AWT Dev> [8] Review request for 7149062: [macosx] dock menu don't show available frames

Scott Kovatch scott.kovatch at oracle.com
Mon Apr 23 10:15:19 PDT 2012


This looks fine to me. Only question is in CPlatformWindow:

 313         if (Window.Type.UTILITY.equals(target.getType())) {
 314             styleBits = SET(styleBits, UTILITY, true);
 315         }

Is this new? It looks needed but not necessarily part of this fix.

It's unfortunate that you have to replicate code in AWTWindow_Normal and AWTWindow_Panel, but I don't see a better way to do it since you want to override methods. Would a category work here? There's not a lot of code here, but it may be harder to maintain over time.

-- Scott

On Apr 23, 2012, at 7:34 AM, Anthony Petrov wrote:

> Mike et al.,
> 
> Could I get a review for this fix please?
> 
> --
> best regards,
> Anthony
> 
> On 04/18/12 16:37, Anthony Petrov wrote:
>> Hello,
>> 
>> Please review a fix for http://bugs.sun.com/view_bug.do?bug_id=7149062 at:
>> 
>> http://cr.openjdk.java.net/~anthony/8-26-windowListInDockMenu-7149062.0/
>> 
>> The AWTWindow class now inherits from NSObject and implements the
>> NSWindowDelegate protocol. The real NSWindow object is held in the
>> nsWindow property of the AWTWindow class, and is represented by either
>> an AWTWindow_Normal or AWTWindow_Panel instance. These two classes
>> inherit from NSWindow and NSPanel correspondingly. Note, however, that
>> we still return a reference to the NSWindow/NSPanel instance to Java so
>> that the pointer could be used with CWrapper methods directly. A
>> reference to an associated AWTWindow instance is always available as
>> (AWTWindow*)[nsWindow delegate].
>> 
>> All windows that inherit from NSWindow are added to the windows list in
>> the dock icon menu by default. We use NSPanel-based windows for UTILITY,
>> HUD, NONACTIVATING, and HIDES_ON_DEACTIVATE windows only, because these
>> kinds of windows typically don't represent main application windows, and
>> thus aren't expected to be added to the windows list. Besides, UTILITY
>> (and HUD?) windows just have to be NSPanels.
>> 
>> This fix is going to be back-ported to 7u6 later on.
>> 
>> --
>> best regards,
>> Anthony




More information about the awt-dev mailing list