<AWT Dev> [7u4] Review request for 7145818: [macosx] dialogs not showing when JFrame is in full screen mode
Anthony Petrov
anthony.petrov at oracle.com
Thu Mar 1 13:10:40 PST 2012
Hi Mike,
Thanks for the review! Please see my comments inline.
On 3/1/2012 9:31 PM, Mike Swingler wrote:
> On Feb 29, 2012, at 6:58 AM, Anthony Petrov wrote:
>> http://cr.openjdk.java.net/~anthony/x-21-popupInFullscreen-7145818.0/
>
> A few points to consider:
>
> * To protect against the unrecognized selector problem, you should test if the AWTWindow object -respondsToSelector:@selector(toggleFullScreen) before just calling it.
I'm aware of -respondsToSelector. But I suppose that in that case this
simply won't work on 10.6.8 at all. Since
a) presently it does work on 10.6.8 for reasons unknown, and
b) we officially support 10.7+ only, hence the check makes little sense
in theory, and
c) from ObjC perspective sending an unknown selector isn't an error, but
just a warning,
it seems to me that having this warning printed out to the console
(which isn't seen by 99% of users anyway) is OK when running on 10.6.8.
Plus we get the full screen working there. Isn't it awesome?
> * Also, there is already API that calls -toggleFullScreen in the eAWT classes that you might not be aware of. You should probably test for interactions with that, since apps can opt their window into having a full screen widget icon and independently toggle fullscreen.
Thanks for pointing this out. I'll rework this code to make sure calls
from EAWT update the boolean flag.
> * In some cases, seeing the menubar is actually desirable, where as in the "exclusive" mode, it's probably not. Perhaps you could consult a client property on the window to determine if the menu bar should be hidden?
Excellent idea! I think that by default the menu should be hidden (for
Java spec's sake). But if a client property is set, then the menu would
be visible.
> I like this overall solution, because it uses the native platform concept of full screen which doesn't trap the user from switching spaces like the Java SE 6 implementation did.
We've noticed an interesting detail with -toggleFullScreen when it's
used in a multi-screen environment. In that case the window will go full
screen on the biggest monitor (actually we have a MacBook with an
external monitor connected.) The OS seems to ignore the screen where the
window were before entering the FS mode (the main notebook display). Is
this OK? Can we force it to use the same screen where the window is
originally located for the FS mode?
--
best regards,
Anthony
More information about the awt-dev
mailing list