-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Mark, isnt that considered a hack?
I would like to see it documented like one if so. This would IMHO help the brave persons who will tear current AWT implementation apart and re-engineer it. :) cu Robert Mark Wielaard wrote: > Hi, > > Robert pointed out a regression that happened with almost any free swing > based application when using cairo with gnu.java.awt.peer.gtk.Graphics > set to Graphics2D. A cast to GtkImage made all calls to prepareImage > fail. This patch only prepares GtkImages and just assumes all other > images are already prepared. > > 2005-04-30 Mark Wielaard <[EMAIL PROTECTED]> > > * gnu/java/awt/peer/gtk/GtkToolkit.java (prepareImage): Only prepare > GtkImages. > > This makes things like JEdit start up again. > > Committed, > > Mark > > > ------------------------------------------------------------------------ > > Index: gnu/java/awt/peer/gtk/GtkToolkit.java > =================================================================== > RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java,v > retrieving revision 1.67 > diff -u -r1.67 GtkToolkit.java > --- gnu/java/awt/peer/gtk/GtkToolkit.java 16 Feb 2005 13:59:03 -0000 > 1.67 > +++ gnu/java/awt/peer/gtk/GtkToolkit.java 30 Apr 2005 11:55:45 -0000 > @@ -403,32 +403,41 @@ > return systemClipboard; > } > > + /** > + * Prepares a GtkImage. For every other kind of Image it just > + * assumes the image is already prepared for rendering. > + */ > public boolean prepareImage (Image image, int width, int height, > ImageObserver observer) > { > - GtkImage i = (GtkImage) image; > - > - if (i.isLoaded ()) return true; > - > - class PrepareImage extends Thread > - { > - GtkImage image; > - ImageObserver observer; > - > - PrepareImage (GtkImage image, ImageObserver observer) > + if (image instanceof GtkImage) > { > - this.image = image; > - image.setObserver (observer); > - } > - > - public void run () > - { > - image.source.startProduction (image); > + GtkImage i = (GtkImage) image; > + > + if (i.isLoaded ()) return true; > + > + class PrepareImage extends Thread > + { > + GtkImage image; > + ImageObserver observer; > + > + PrepareImage (GtkImage image, ImageObserver observer) > + { > + this.image = image; > + image.setObserver (observer); > + } > + > + public void run () > + { > + image.source.startProduction (image); > + } > + } > + > + new PrepareImage (i, observer).start (); > + return false; > } > - } > - > - new PrepareImage (i, observer).start (); > - return false; > + else > + return true; > } > > public native void sync(); > > > ------------------------------------------------------------------------ > > _______________________________________________ > Classpath-patches mailing list > Classpath-patches@gnu.org > http://lists.gnu.org/mailman/listinfo/classpath-patches -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCddYpG9cfwmwwEtoRAt2oAKCEKPO6U0Cq7FyfNZI6E9Lx45OdXACeNQEr aM5yrKvRA1NqTgE8nSCJ2uk= =HS6H -----END PGP SIGNATURE----- _______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches