[cp-patches] FYI: Make sure cursor updates are immediate

Mark Wielaard mark at klomp.org
Wed Mar 29 09:06:10 UTC 2006


Hi,

This is a small update to my earlier component setCursor()
implementation. It makes sure that the cursor update is immediate.
Previously the cursor update didn't take place till the component was
explicitly repainted but Norman gave an example were it is desired to
just update the cursor and you don't want the user code to have to
explicitly repaint.

2006-03-29  Mark Wielaard  <mark at klomp.org>

        Fixes bug #26527
        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
        (gtkWidgetSetCursorUnlocked): Call gdk_flush().

Committed,

Mark

diff -u -r1.60 gnu_java_awt_peer_gtk_GtkComponentPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c        22 Mar 2006 23:28:32 -0000      1.60
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c        29 Mar 2006 08:58:28 -0000
@@ -270,6 +270,9 @@

   gdk_window_set_cursor (widget->window, gdk_cursor);
   gdk_cursor_unref (gdk_cursor);
+
+  /* Make sure the cursor is replaced on screen. */
+  gdk_flush();
 }

 JNIEXPORT void JNICALL

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060329/4cb2fd96/attachment.pgp


More information about the Classpath-patches mailing list