diff -urp vte-0.34.9.orig/src/vte.c vte-0.34.9/src/vte.c
--- vte-0.34.9.orig/src/vte.c	2013-10-14 21:16:40.000000000 +0200
+++ vte-0.34.9/src/vte.c	2013-10-17 02:12:49.073164125 +0200
@@ -5912,7 +5912,7 @@ vte_terminal_send_mouse_button_internal(
 }
 
 /* Send a mouse button click/release notification. */
-static void
+static gboolean
 vte_terminal_maybe_send_mouse_button(VteTerminal *terminal,
 				     GdkEventButton *event)
 {
@@ -5921,17 +5921,17 @@ vte_terminal_maybe_send_mouse_button(Vte
 	switch (event->type) {
 	case GDK_BUTTON_PRESS:
 		if (terminal->pvt->mouse_tracking_mode < MOUSE_TRACKING_SEND_XY_ON_CLICK) {
-			return;
+			return FALSE;
 		}
 		break;
 	case GDK_BUTTON_RELEASE: {
 		if (terminal->pvt->mouse_tracking_mode < MOUSE_TRACKING_SEND_XY_ON_BUTTON) {
-			return;
+			return FALSE;
 		}
 		break;
 	}
 	default:
-		return;
+		return FALSE;
 		break;
 	}
 
@@ -5939,10 +5939,11 @@ vte_terminal_maybe_send_mouse_button(Vte
 						event->button,
 						event->type == GDK_BUTTON_RELEASE,
 						event->x, event->y);
+	return TRUE;
 }
 
 /* Send a mouse motion notification. */
-static void
+static gboolean
 vte_terminal_maybe_send_mouse_drag(VteTerminal *terminal, GdkEventMotion *event)
 {
 	int width = terminal->char_width;
@@ -5954,28 +5955,29 @@ vte_terminal_maybe_send_mouse_drag(VteTe
 	switch (event->type) {
 	case GDK_MOTION_NOTIFY:
 		if (terminal->pvt->mouse_tracking_mode < MOUSE_TRACKING_CELL_MOTION_TRACKING)
-			return;
+			return FALSE;
 
 		if (terminal->pvt->mouse_tracking_mode < MOUSE_TRACKING_ALL_MOTION_TRACKING) {
 
 			if (terminal->pvt->mouse_last_button == 0) {
-				return;
+				return FALSE;
 			}
 			/* the xterm doc is not clear as to whether
 			 * all-tracking also sends degenerate same-cell events */
 			if (col == terminal->pvt->mouse_last_x / width &&
 			    row == terminal->pvt->mouse_last_y / height)
-				return;
+				return FALSE;
 		}
 		break;
 	default:
-		return;
+		return FALSE;
 		break;
 	}
 
 	vte_terminal_feed_mouse_event(terminal, terminal->pvt->mouse_last_button,
 				      TRUE /* drag */, FALSE /* not release */,
 				      col, row);
+	return TRUE;
 }
 
 /* Clear all match hilites. */
@@ -7458,8 +7460,7 @@ vte_terminal_button_press(GtkWidget *wid
 		/* If we haven't done anything yet, try sending the mouse
 		 * event to the app. */
 		if (handled == FALSE) {
-			vte_terminal_maybe_send_mouse_button(terminal, event);
-			handled = TRUE;
+			handled = vte_terminal_maybe_send_mouse_button(terminal, event);
 		}
 		break;
 	case GDK_2BUTTON_PRESS:
@@ -7473,6 +7474,7 @@ vte_terminal_button_press(GtkWidget *wid
 				vte_terminal_start_selection(terminal,
 							     x, y,
 							     selection_type_char);
+				handled = TRUE;
 			}
 			if ((terminal->pvt->modifiers & GDK_SHIFT_MASK) ||
 			    !terminal->pvt->mouse_tracking_mode) {
@@ -7481,6 +7483,7 @@ vte_terminal_button_press(GtkWidget *wid
 							     selection_type_word);
 				vte_terminal_extend_selection(terminal,
 							      x, y, FALSE, TRUE);
+				handled = TRUE;
 			}
 			break;
 		case 2:
@@ -7503,6 +7506,7 @@ vte_terminal_button_press(GtkWidget *wid
 							     selection_type_line);
 				vte_terminal_extend_selection(terminal,
 							      x, y, FALSE, TRUE);
+				handled = TRUE;
 			}
 			break;
 		case 2:
@@ -7519,7 +7523,7 @@ vte_terminal_button_press(GtkWidget *wid
 	terminal->pvt->mouse_last_x = x;
 	terminal->pvt->mouse_last_y = y;
 
-	return TRUE;
+	return handled;
 }
 
 /* Read and handle a pointing device buttonrelease event. */
@@ -7560,8 +7564,7 @@ vte_terminal_button_release(GtkWidget *w
 			break;
 		}
 		if (!handled) {
-			vte_terminal_maybe_send_mouse_button(terminal, event);
-			handled = TRUE;
+			handled = vte_terminal_maybe_send_mouse_button(terminal, event);
 		}
 		break;
 	default:
@@ -7574,7 +7577,7 @@ vte_terminal_button_release(GtkWidget *w
 	terminal->pvt->mouse_last_y = y;
 	terminal->pvt->selecting_after_threshold = FALSE;
 
-	return TRUE;
+	return handled;
 }
 
 /* Handle receiving or losing focus. */
