2003-12-16 Fernando Nasser <fnasser@redhat.com>

* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
        (pre_event_handler): Handle GtkButton widgets differently as events
        go to its event_window.
        (connect_awt_hook): Remove compiler warning.

From-SVN: r74704
This commit is contained in:
Fernando Nasser 2003-12-16 17:20:34 +00:00 committed by Fernando Nasser
parent 877342e5e0
commit aeb5418870
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2003-12-16 Fernando Nasser <fnasser@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Handle GtkButton widgets differently as events
go to its event_window.
(connect_awt_hook): Remove compiler warning.
i2003-12-16 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/ObjectInputStream.java

View File

@ -1064,6 +1064,10 @@ pre_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer)
{
obj_window = gtk_widget_get_parent (window->focus_widget)->window;
}
else if (GTK_IS_BUTTON (window->focus_widget))
/* GtkButton events go to the "event_window" and this is what
we registered when the button was created. */
obj_window = GTK_BUTTON (window->focus_widget)->event_window;
else
obj_window = window->focus_widget->window;
@ -1164,7 +1168,7 @@ connect_awt_hook (JNIEnv *env, jobject peer_obj, int nwindows, ...)
{
va_list ap;
jobject *obj;
void *ptr = NSA_GET_PTR (env, peer_obj);
//void *ptr = NSA_GET_PTR (env, peer_obj);
obj = NSA_GET_GLOBAL_REF (env, peer_obj);
//g_print("Connection obj %s\n", gtk_widget_get_name (GTK_WIDGET (ptr)));