<AWT Dev> hg: jdk7/awt/jdk: 6708392: Provide internal API to create OverrideRedirect windows, XToolkit
Anthony Petrov
Anthony.Petrov at Sun.COM
Fri Aug 15 01:44:29 PDT 2008
On 08/15/2008 11:16 AM Artem Ananiev wrote:
>> - You add this to the generic SunToolkit class, but it seems specific to
>> the XToolkit. It might be better to rename this property from
>> OverrideRedirect to something X11/ICCCM specific. Maybe call it
>> isPopupWindow? Then it is clear why some windows might have this hint
>> set for their (swing) popups and then other toolkits/window/display
>> managers could act appropriately.
>
> The answer for both questions is: java.awt.* classes should only expose
> functionality available on all the supported platforms. Otherwise (like
> in this case with OverrideRedirect hint), sun.awt.* packages are used.
> If we later find a Win32 hint which corresponds to X11 OverrideRedirect,
> we'll move the code from sun.awt.* to java.awt.* and/or make it public.
I don't think this is a huge problem. After all we use the override
redirect option for popup windows (menus, tooltips, etc.). Thus, we
could introduce a sort of setPopupWindow()/isPopupWindow() in the
WindowPeer or whatever other shared location. Surely, this flag wouldn't
have much meaning on MS Windows platform (though theoretically this
corresponds to the WS_POPUP style, to which we assign a slightly
different meaning in our code), however on X11 this flag would cause
enabling the override redirect for this window. And the name of the flag
would be in no way related to any X11-specific issues but would just say
"this is a popup window", which seems quite cross-platform, doesn't it?
--
best regards,
Anthony
More information about the jdk7-changes
mailing list