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]
This commit is contained in:
Simon Tatham
2004-04-28 17:42:32 +00:00
parent 3b1ec74d73
commit e96f53452a
2 changed files with 22 additions and 9 deletions

6
gtk.c
View File

@ -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