This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix to KEY events


Most credits should go to Tom Fitzsimmons, but here is a fix for an annoying problem that would make any keypress (even a SHIFT key one) cause a checkbox to toggle, buttons to appear to have been pressed etc.

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

        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler):
        Do not meddle with the activation state of peer widgets on each
        key press or release.
Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,v
retrieving revision 1.11
diff -c -p -r1.11 gnu_java_awt_peer_gtk_GtkEvents.c
*** jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c	2 Dec 2003 16:19:28 -0000	1.11
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c	3 Dec 2003 19:11:21 -0000
*************** awt_event_handler (GdkEvent *event)
*** 1128,1134 ****
--- 1128,1137 ----
  		&& GTK_WIDGET_IS_SENSITIVE (window->focus_widget)
  		&& window->focus_widget->window)
  	      {
+ 	        /* XXX We don't know what the intention was here, but 
+ 		   this is definitively _not_ the right thing to do
  		gtk_widget_activate (window->focus_widget);
+ 		 */
  
                  /* TextArea peers are attached to the scrolled window
                     that contains the GtkTextView, not to the text view
*************** awt_event_handler (GdkEvent *event)
*** 1187,1193 ****
--- 1190,1199 ----
  		&& GTK_WIDGET_IS_SENSITIVE (window->focus_widget)
  		&& window->focus_widget->window)
  	      {
+ 	        /* XXX We don't know what the intention was here, but 
+ 		   this is definitively _not_ the right thing to do
  		gtk_widget_activate (window->focus_widget);
+ 		 */
  
                  if (GTK_IS_TEXT_VIEW (window->focus_widget)
                      || GTK_IS_CLIST (window->focus_widget))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]