/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28.2.1 by gnu_andrew, Fri Jan 14 10:24:17 2005 UTC revision 1.28.2.2 by gnu_andrew, Sat Jan 15 17:02:22 2005 UTC
# Line 827  pre_event_handler (GtkWidget *widget, Gd Line 827  pre_event_handler (GtkWidget *widget, Gd
827    static guint button_number = -1;    static guint button_number = -1;
828    static jint click_count = 1;    static jint click_count = 1;
829    static int hasBeenDragged;    static int hasBeenDragged;
830      union widget_union w;
831    
832    /* If it is not a focus change event, the widget must be realized already.    /* If it is not a focus change event, the widget must be realized already.
833       If not, ignore the event (Gtk+ will do the same). */       If not, ignore the event (Gtk+ will do the same). */
834    if (!(event->type == GDK_FOCUS_CHANGE || GTK_WIDGET_REALIZED(widget)))    if (!(event->type == GDK_FOCUS_CHANGE || GTK_WIDGET_REALIZED(widget)))
835      return FALSE;      return FALSE;
836        
837    /* Do not handle propagated events.  AWT has its own propagation rules */    /* Do not handle propagated events.  AWT has its own propagation rules */
838    gdk_window_get_user_data (event->any.window, (void **) &event_widget);    w.widget = &event_widget;
839      gdk_window_get_user_data (event->any.window, w.void_widget);
840    if (event_widget != widget)    if (event_widget != widget)
841      return FALSE;      return FALSE;
842    
# Line 1122  connect_awt_hook (JNIEnv *env, jobject p Line 1124  connect_awt_hook (JNIEnv *env, jobject p
1124    va_end (ap);    va_end (ap);
1125  }  }
1126    
1127    /*
1128     * Attach a Java object that is backed by widget.  This callback is
1129     * called after the widget's window has been realized.  That way, we
1130     * can be sure that widget->window is non-NULL, and so can have data
1131     * connected to it.
1132     */
1133    void connect_awt_hook_cb (GtkWidget *widget __attribute__((unused)),
1134                              jobject peer)
1135    {
1136      void *ptr;
1137    
1138      ptr = NSA_GET_PTR (gdk_env, peer);
1139    
1140      connect_awt_hook (gdk_env, peer, 1, GTK_WIDGET (ptr)->window);
1141    
1142      gdk_threads_leave ();
1143    
1144      (*gdk_env)->CallVoidMethod (gdk_env, peer, setCursorID);
1145    
1146      gdk_threads_enter ();
1147    }

Legend:
Removed from v.1.28.2.1  
changed lines
  Added in v.1.28.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26