1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-28 23:34:49 -05:00

Support scrolling with the mouse wheel (X servers apparently usually

send a button 4 press for an upward wheel movement and a button 5
press for a downward one). Untested since my own trackball's button
4 does nothing obvious. Someone with a mouse wheel should give this
a workout.

[originally from svn r2069]
This commit is contained in:
Simon Tatham 2002-10-15 16:50:42 +00:00
parent c01c1db847
commit 0fdab304de

View File

@ -722,6 +722,15 @@ gint button_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
show_mouseptr(1);
if (event->button == 4 && event->type == GDK_BUTTON_PRESS) {
term_scroll(0, -5);
return TRUE;
}
if (event->button == 5 && event->type == GDK_BUTTON_PRESS) {
term_scroll(0, +5);
return TRUE;
}
shift = event->state & GDK_SHIFT_MASK;
ctrl = event->state & GDK_CONTROL_MASK;
alt = event->state & GDK_MOD1_MASK;