Frame shrinkage bug

Marko Rauhamaa marko at calnet28-100.gtecablemodem.com
Sat Aug 22 00:07:38 PDT 1998


> >I can't say I quite understand the rationale behind this shrinkage
> >mechanism since the frame decorations are _outside_ the frame window
> >(and depend totally on the window manager).
> 
> Yes - but unfortunately, Java Frame sizes pretend to include the
> deco. And even worse, there is no portable way to query the deco extends.

Where does it say Frames _include_ the decorations? According to the Sun
description

  http://java.sun.com/products/jdk/1.1/docs/api/java.awt.Frame.html

Frames simply _have_ a title and a border: "A Frame is a top-level
window with a title and a border."

X applications are not supposed to know about their decorations. In
fact, many Linux setups come with a runtime window manager selection,
which naturally means that the decorations and their geometries may
change on the fly.

Why should a frame know its exact outer bounds and location on the
display? One reason might be that the programmer wants to lay out the
frames in pleasing positions. However, a good X application allows the
window manager, maybe with the help of the user, to decide on the
location of frames.

So it may be that Kaffe AWT can pretend that the decorations take up
zero space on an X display and still be in full compliance with the AWT
spec.

In any event, this current solution is clearly not acceptable because it
destroys the internal layout of the frame. If the Frame class absolutely
needs to fake the inclusion of the decorations, it should expand its
outer bounds rather than shrinking its insides.

(Don't get my tone wrong -- I'm very excited about Kaffe.)


Marko

-- 
Marko Rauhamaa   mailto:marko.rauhamaa at iki.fi   http://www.iki.fi/pacujo/
Suomenkielinen esperantokurssi http://www.iki.fi/pacujo/esperanto/kurssi/
    Free Esperanto Course http://www.iki.fi/pacujo/esperanto/course/


More information about the kaffe mailing list