diff options
author | Fernando Nasser <fnasser@redhat.com> | 2004-01-16 22:30:11 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@gcc.gnu.org> | 2004-01-16 22:30:11 +0000 |
commit | 2f9c39f8fc04b38b6aac1ad71c83b22cede8b9e9 (patch) | |
tree | a69972849a745b4dc2563dd515b2cdc6a5cffcf4 | |
parent | da1c22e1440a033e28fb87dda9e00bfe2a1b8edb (diff) | |
download | gcc-2f9c39f8fc04b38b6aac1ad71c83b22cede8b9e9.zip gcc-2f9c39f8fc04b38b6aac1ad71c83b22cede8b9e9.tar.gz gcc-2f9c39f8fc04b38b6aac1ad71c83b22cede8b9e9.tar.bz2 |
gnu_java_awt_peer_gtk_GtkEvents.c (pre_event_handler): Discard GDK_ENTER_NOTIFY related to ungrabs.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (pre_event_handler):
Discard GDK_ENTER_NOTIFY related to ungrabs.
From-SVN: r75999
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c | 21 |
2 files changed, 18 insertions, 8 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index c1083e8..f181820 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,10 @@ 2004-01-16 Fernando Nasser <fnasser@redhat.com> + * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (pre_event_handler): + Discard GDK_ENTER_NOTIFY related to ungrabs. + +2004-01-16 Fernando Nasser <fnasser@redhat.com> + * java/awt/EventQueue.java (pop): Prevent breaking the chain if pop is called for an intermediate queue. diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c index 42f45b4..6004847 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c @@ -960,16 +960,21 @@ pre_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer) } break; case GDK_ENTER_NOTIFY: - (*gdk_env)->CallVoidMethod (gdk_env, peer, postMouseEventID, - AWT_MOUSE_ENTERED, - (jlong)event->crossing.time, - state_to_awt_mods (event->crossing.state), - (jint)event->crossing.x, - (jint)event->crossing.y, - 0, - JNI_FALSE); + /* We are not interested in enter events that are due to + grab/ungrab and not to actually crossing boundaries */ + if (event->crossing.mode == GDK_CROSSING_NORMAL) + (*gdk_env)->CallVoidMethod (gdk_env, peer, postMouseEventID, + AWT_MOUSE_ENTERED, + (jlong)event->crossing.time, + state_to_awt_mods (event->crossing.state), + (jint)event->crossing.x, + (jint)event->crossing.y, + 0, + JNI_FALSE); break; case GDK_LEAVE_NOTIFY: + /* We are not interested in leave events that are due to + grab/ungrab and not to actually crossing boundaries */ if (event->crossing.mode == GDK_CROSSING_NORMAL) (*gdk_env)->CallVoidMethod (gdk_env, peer, postMouseEventID, |