Translucent/Shaped Windows
Artem Ananiev
artem.ananiev at oracle.com
Thu Jul 19 06:39:29 PDT 2012
Hi, Doug,
thanks for digging this up. We've already have a number of bugs related
to java.awt.Window shapes support on Mac, so please don't file new ones
before making sure they are not duplicates.
Whether the fixes will be integrated to 7u6 or postponed until 7u8 is an
open question. 7u6 development is in the final phase, and only critical
fixes are accepted. Could you wait until 7u6 is released and check if
your problems are still there, please?
Another thing you could check is to try JDK8. The fix for 7124244 should
be there in a few weeks.
Thanks,
Artem
On 7/18/2012 1:53 AM, Doug Zwick wrote:
>> What is the current status of the Translucent/Shaped Windows API in
>> the OS X port? I am updating some code using the old Java 1.6
>> temporary API to use the final 1.7 API, and the window is not
>> passing mouse clicks through properly (the Apple 1.6 JRE did pass
>> clicks through). I am running with 1.7.0_05. I did notice that
>> calls to Window.setShape throw an exception:
>>
>> java.lang.UnsupportedOperationException: PERPIXEL_TRANSPARENT
>> translucency is not supported.
>>
>> However,
>> GraphicsDevice.isWindowTranslucencySupported(PERPIXEL_TRANSLUCENT)
>> returned true. The Apple J2SE 6 implementation did much the same
>> thing. I believe Apple's JVM passed clicks through based on the
>> painted alpha, rather than using the window shape, and that the
>> Java 1.7.0_05 likely does not do this. Another difference is that
>> the J2SE 7 API dropped the AWTUtilities.setWindowOpaque(boolean)
>> method, and handles this automatically when the Window instance
>> setBackground method is invoked with a non-opaque colour. I have
>> set the background of the Window to new Color(0, 0, 0, 0), so I
>> don't believe that this is the issue.
>
> I can confirm that the code works correctly (the shaped window passes
> clicks through as expected) on Windows under Java 1.7.0_05. The
> problem still exists in the current Mac EA for update 6
> (1.7.0_06-ea-b19). Should I enter a bug report? Is bugs.sun.com still
> the right place, or is there an Oracle or OpenJDK bug database these
> days? I think there are two bugs here -- that the transparent window
> does not pass clicks, and that Window.setShape throws when
> isWindowTranslucencySupported says it should work. Do you have a
> preference on how I enter them?
>
> This email and any attachments may contain confidential and
> proprietary information of Blackboard that is for the sole use of the
> intended recipient. If you are not the intended recipient,
> disclosure, copying, re-distribution or other use of any of this
> information is strictly prohibited. Please immediately notify the
> sender and delete this transmission if you received this email in
> error.
More information about the macosx-port-dev
mailing list