[gui][PATCH] Flush GDK events in Graphics drawing methods

Thomas Fitzsimmons fitzsim@redhat.com
Tue Jun 15 03:48:00 GMT 2004


Hi,

This patch adds gdk_flush calls to all of GdkGraphics' drawing
functions.  Since drawing can occur in a thread separate from the GTK
main loop, we need to manually flush events where they would normally be
flushed at the start of each main loop iteration.  Otherwise animations
created by drawing to a Graphics object will not update properly which
results in unsightly flickering.

I committed this patch to java-gui-branch.

Tom

2004-06-14  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c (drawString):
	Wrap baseline y value in PANGO_PIXELS macro, rather than simply
	dividing by PANGO_SCALE.  Call gdk_flush before leaving GDK
	critical region.
	(drawLine): Call gdk_flush before leaving GDK critical region.
	(fillRect): Likewise.
	(drawRect): Likewise.
	(copyArea): Likewise.
	(copyPixmap): Likewise.
	(clearRect): Likewise.
	(drawArc): Likewise.
	(drawPolyline): Likewise.
	(drawPolygon): Likewise.
	(fillPolygon): Likewise.
	(fillArc): Likewise.
	(drawOval): Likewise.
	(fillOval): Likewise.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdkgraphics-flush.patch
Type: text/x-patch
Size: 3426 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040615/a56a947c/attachment.bin>


More information about the Java-patches mailing list