Hack scrollwheel support into the eventloop, by treating button 4-5
Wed Jan 27 18:40:50 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Hack scrollwheel support into the eventloop, by treating button 4-5 presses on scrolled windows and scrollbars specially. Put it here to keep the ugliness small and confined. (We need to intercept the normal propagation in any case to have this work reliably right now, since some subwidgets will trap the button presses) * gtk/gtkviewport.c (gtk_viewport_realize): Select for BUTTON_PRESS to support the above hack.
This commit is contained in:
@ -430,7 +430,9 @@ gtk_viewport_realize (GtkWidget *widget)
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
|
||||
event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
|
||||
attributes.event_mask = event_mask;
|
||||
/* We select on button_press_mask so that button 4-5 scrolls are trapped.
|
||||
*/
|
||||
attributes.event_mask = event_mask | GDK_BUTTON_PRESS_MASK;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user