<AWT Dev> hg: jdk7/awt/jdk: 6708392: Provide internal API to create OverrideRedirect windows, XToolkit

Oleg Sukhodolsky oleg.sukhodolsky at gmail.com
Fri Aug 15 13:21:15 PDT 2008


Adding new API is always interesting thing :)  But, please, do not add
this method to Window,
because Frame and Dialog will inherit it and number other methods
which have no reasons for popups (e.g. toFront()).  (Btw with current
implementation you can set OverrideRedirect on modal dialog  :)

Oleg.

On Fri, Aug 15, 2008 at 12:44 PM, Anthony Petrov <Anthony.Petrov at sun.com> wrote:
> 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 awt-dev mailing list