Index: src/terminal-notebook.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-notebook.c,v
retrieving revision 1.8
diff -u -p -d -r1.8 terminal-notebook.c
--- src/terminal-notebook.c	30 Jan 2006 04:15:18 -0000	1.8
+++ src/terminal-notebook.c	12 Apr 2006 08:44:51 -0000
@@ -623,7 +623,7 @@ button_press_cb (TerminalNotebook *noteb
       return TRUE;
     }
 
-  if ((event->button == 1) && (event->type == GDK_BUTTON_PRESS)
+  if ((event->type == GDK_BUTTON_PRESS) && (event->button == 1)
       && (tab_clicked >= 0))
     {
       notebook->priv->x_start = event->x_root;
Index: src/terminal-screen.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-screen.c,v
retrieving revision 1.123
diff -u -p -d -r1.123 terminal-screen.c
--- src/terminal-screen.c	2 Apr 2006 12:29:45 -0000	1.123
+++ src/terminal-screen.c	12 Apr 2006 08:44:52 -0000
@@ -1807,11 +1807,24 @@ terminal_screen_button_press_event (GtkW
       return TRUE; /* don't do anything else such as select with the click */
     }
       
-  if ((event->button == 3) &&
-      !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)))
+  if (event->type == GDK_BUTTON_PRESS && event->button == 3)
     {
-      terminal_screen_do_popup (screen, event);
-      return TRUE;
+      if (!(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)))
+	{
+	  /* on right-click, we should first try to send the mouse event to
+	   * the client, and popup only if that's not handled. */
+	  if (GTK_WIDGET_GET_CLASS (screen->priv->term)->button_press_event ((GtkWidget *)screen->priv->term, event))
+	    return TRUE;
+
+	  terminal_screen_do_popup (screen, event);
+	  return TRUE;
+	}
+      else if (!(event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
+        {
+	  /* do popup on shift+right-click */
+	  terminal_screen_do_popup (screen, event);
+	  return TRUE;
+	}
     }
 
   /* default behavior is to let the terminal widget deal with it */

