[8] Review request for 7124513: [macosx] Support NSTexturedBackgroundWindowMask/different titlebar styles to create unified toolbar

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Jul 4 03:07:30 PDT 2012


Hi,Anthony.
Thanks for review. See my comments inline.

04.07.2012 13:20, Anthony Petrov wrote:
> Hi Sergey,
>
> src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
>>          // If the target is a dialog, popup or tooltip we want it to 
>> ignore the brushed metal look.
>>          if (isPopup) {
>> -            styleBits = SET(styleBits, TEXTURED, true);
>> +            styleBits = SET(styleBits, TEXTURED, false);
>
> Given the change, does the comment above if() still apply to this code? 
Well I just change the code according the comments. This code means that 
we ignore this property if it was set.
styleBits = SET(styleBits, TEXTURED, false);

> Also, this comment seems to imply we want to ignore the user's 
> TEXTURED bit for these kinds of windows. What is the reason you change 
> this logic? Will this be a regression for some use cases?
>
>
> src/macosx/classes/sun/lwawt/LWWindowPeer.java
>>  455     public final boolean isTranslucent() {
>>  456         synchronized (getStateLock()) {
>>  457             return !isOpaque || isShaped()|| isTextured();
>
> It is unclear why textured windows must be considered translucent. 
Because textured window is a special case of translucent window. The 
difference is only in nswindow background. So when we set texture 
property our peer became fully translucent. It doesn't fill background, 
create non opaque backbuffers and layer etc.
> Could you add a comment explaining that, or yet better, not do this 
> change at all? After all, we can always insert explicit checks for 
> isTextured() in places where it is really necessary. Otherwise I 
> suggest to rename the isTranslucent() to something else, because 
> textured doesn't really mean translucent.
>
> I'm not an expert in Swing/laf code, so I didn't review those parts.
>
> -- 
> best regards,
> Anthony
>
> On 7/2/2012 5:46 PM, Sergey Bylokhov wrote:
>>
>> Hi Everyone,
>> Please review the fix.
>> 1 When the property "apple.awt.brushMetalLook" is set we draw our 
>> panels and toolbars with composite=SRc and alpha=0.
>> 2 Changes in JViewport are needed, because copyArea does not handle 
>> correctly content with alpha!=1.0.
>>
>>
>> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124513
>> Webrev can be found at: 
>> http://cr.openjdk.java.net/~serb/7124513/webrev.00/
>>
>> Also note that this CR depends from CR 7124244.
>>
>> -- 
>> Best regards, Sergey.
>>


-- 
Best regards, Sergey.



More information about the macosx-port-dev mailing list