From e96f53452ac06e6b533a30d4caad30dd0dbe46fb Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 28 Apr 2004 17:42:32 +0000 Subject: Shift-click is equivalent to middle-click. This is mostly for Windows users who may not have a middle button at all, but I've replicated it in GTK to maintain cross-platform consistency. [originally from svn r4166] --- gtk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk.c') diff --git a/gtk.c b/gtk.c index b69e95d..8a26730 100644 --- a/gtk.c +++ b/gtk.c @@ -181,10 +181,10 @@ static gint button_event(GtkWidget *widget, GdkEventButton *event, if (event->type != GDK_BUTTON_PRESS) return TRUE; - if (event->button == 1) - button = LEFT_BUTTON; - else if (event->button == 2) + if (event->button == 2 || (event->state & GDK_SHIFT_MASK)) button = MIDDLE_BUTTON; + else if (event->button == 1) + button = LEFT_BUTTON; else if (event->button == 3) button = RIGHT_BUTTON; else -- cgit v1.1