[kaffe] kaffe and AWT on MIPS with multiple windows
Gianluca Moro
giangiammy at yahoo.com
Thu Oct 6 06:23:44 PDT 2005
--- Gianluca Moro <giangiammy at yahoo.com> wrote:
> Hi all,
>
> I'm working on the porting of KAFFE on MIPS platform, with
> AWT and Nano-X interface.
>
> My current problem is a helloworld program with
> multiple frames: the problem is that all the drawing
> is done on the first created frame: it seems thar AWT
> do not keep the id of the various frame, or do not update it
> or something so ...
> (the code on Kaffe on PC works OK)
>
> Anyone already found something similar?
Looking around in the code, I noted in file
libraries/clib/awt/nano-X/graphics.c, function
Java_java_awt_Toolkit_graInitGraphics
the following code
if ( graphicsP == NULL ) {
graphicsP = (TLKGraphics*) TLK_MALLOC( sizeof(TLKGraphics));
graphicsP->gc = GrNewGC();
graphicsP->region = 0;
graphicsP->target = (GR_ID)target;
graphicsP->targetType = targetType;
graphicsP->gid = (TLK_GRAPHICS_ID)graphicsP;
graphicsP->magicNo = TLK_GRAPHICS_MAGIC_NO;
}
which do not update target if graphicsP is already initialized
I think the code should be
if ( graphicsP == NULL ) {
graphicsP = (TLKGraphics*) TLK_MALLOC( sizeof(TLKGraphics));
graphicsP->gc = GrNewGC();
graphicsP->region = 0;
graphicsP->gid = (TLK_GRAPHICS_ID)graphicsP;
graphicsP->magicNo = TLK_GRAPHICS_MAGIC_NO;
}
graphicsP->target = (GR_ID)target;
graphicsP->targetType = targetType;
where target is always initialized (this draw all the windows)
Now the problem is that a background windows is not refreshed :-(
bye
giammy
--
Gianluca Moro Visit http://ilpinguino.altervista.org/
giangiammy at yahoo.com MyBlog http://blog.libero.it/giangiammy/
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the kaffe
mailing list