http://bugzilla.ximian.com/show_bug.cgi?id=16462 still not fixed in
1.0.3.  Please apply the below patch.  The patch has been stable for me
for weeks in evolution 1.0.2.  Apply with:

cd evolution-1.0.3      (toplevel source dir)
cp <patch location> ../
cat ../patch.evo-bug16462-1.0.3 | patch -p1

This bug is a major usability issue for people with touchpads and this
is the 2nd time I have submitted the patch.  I heard nothing the first
time, however I sent the patch in right before 1.0.3 was released, so I
understand you are busy.  Please advise if I need to do something
differently to get this patch in (or it least tell me if it is
rejected).

James Strandboge

PS-- See previous explanation below:

> To fix bugg #16462, the patch makes the e_minicard_label_event() (in
> addressbook/gui/widgets/e-minicard-label.c) handle the
GDK_BUTTON_PRESS
> event properly.  Before, the e_minicard_label_event() would always
call
> gtk_signal_emit_by_name with a GDK_BUTTON_PRESS, when in fact, it
should
> only call gtk_signal_emit_by_name when the event was a single click
and
> when the label did not have the focus yet.  Checking both of these
> conditions fixes the mouse grab problem (you can now double, triple,
> quadruple or more click and do massive random clicking all throughout
> the minicard without it grabbing the mouse). 
> 
> The patch to fix the double middle mouse click grab is simply making
> e_minicard_event() in e-minicard.c use only button 1 in the
> GDK_BUTTON_PRESS processing, where before it would allow both. 
> Otherwise, the behaviour for the middle mouse click is what the user
> would expect (highlights the label, and pastes if the middle click
> occured in the text).
> 

-- 
Email:        [EMAIL PROTECTED]
GPG/PGP ID:   26384A3A
Fingerprint:  D9FF DF4A 2D46 A353 A289  E8F5 AA75 DCBE 2638 4A3A
diff -Naur evolution-1.0.3-original/addressbook/gui/widgets/e-minicard-label.c evolution-1.0.3/addressbook/gui/widgets/e-minicard-label.c
--- evolution-1.0.3-original/addressbook/gui/widgets/e-minicard-label.c	Wed Mar 20 13:19:32 2002
+++ evolution-1.0.3/addressbook/gui/widgets/e-minicard-label.c	Thu Mar 21 12:21:32 2002
@@ -335,8 +335,39 @@
 	  }
       }
       break;
-    case GDK_BUTTON_PRESS:
-    case GDK_BUTTON_RELEASE: 
+
+    case GDK_BUTTON_PRESS: {
+        gboolean return_val;
+        GdkEvent *next_event;
+
+        /* don't do anything if we already have the focus, but say we
+         * did */
+        if ( e_minicard_label->has_focus )
+                return TRUE;
+
+        /* if no pending events, process the event */
+        if (!gdk_events_pending()) {
+                gtk_signal_emit_by_name(GTK_OBJECT(e_minicard_label->field), "event", event, &return_val);
+                return return_val;
+        }
+
+        next_event = gdk_event_peek();
+        if(next_event != NULL) { 
+                /* since the current event is GDK_BUTTON_PRESS, if the
+                 * next one is GDK_BUTTON_RELEASE, we have a valid
+                 * single click, so process */
+                if (next_event->type == GDK_BUTTON_RELEASE) {
+                        gdk_event_free(next_event);
+                        gtk_signal_emit_by_name(GTK_OBJECT(e_minicard_label->field), "event", event, &return_val);
+                        return return_val;
+                }
+
+                gdk_event_free(next_event);
+        }
+        return TRUE;
+        break;
+    }
+      
     case GDK_MOTION_NOTIFY:
     case GDK_ENTER_NOTIFY:
     case GDK_LEAVE_NOTIFY: {
diff -Naur evolution-1.0.3-original/addressbook/gui/widgets/e-minicard.c evolution-1.0.3/addressbook/gui/widgets/e-minicard.c
--- evolution-1.0.3-original/addressbook/gui/widgets/e-minicard.c	Tue Oct 30 00:00:24 2001
+++ evolution-1.0.3/addressbook/gui/widgets/e-minicard.c	Thu Mar 21 12:00:33 2002
@@ -537,7 +537,7 @@
 		}
 		break;
 	case GDK_BUTTON_PRESS: {
-		if (1 <= event->button.button && event->button.button <= 2) {
+		if (event->button.button == 1) {
 			int ret_val = e_minicard_selected(e_minicard, event);
 			GdkEventMask mask = ((1 << (4 + event->button.button)) |
 					     GDK_POINTER_MOTION_MASK |

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to